Skip to main content
Nintex Community Menu Bar
Question

Bulk Update User Profile Picture on-prem and online

  • August 2, 2023
  • 5 replies
  • 205 views
  • Translate

rei_dipetersen
Forum|alt.badge.img+4

We are currently using Nintex Workflow for our on-prem SharePoint 2019 Farm.  We will be migrating to SPO soon.  I have been tasked with figuring out how to update the User Profile Picture for all employees both on-prem and online.  We currently don’t have a federated AD so updating AzureAD won’t work for on-prem.

Does anyone know if NIntex Workflow can do this?  I know I can update a user profile property and supply a picture URL, but that doesn’t implement the default picture upload, which creates 3 different sizes.  It only references the url supplied.

Any recommendations are appreciated.

 

Did this topic help you find an answer to your question?

5 replies

Sven
Forum|alt.badge.img+7
  • Novice
  • 66 replies
  • August 3, 2023

Hi, if there is a web service on MS side, we could do it, I think. 

Can you take a look at the graph explorer (https://developer.microsoft.com/en-us/graph/graph-explorer) here you can a lot of function which we then could use via the Action “Call a webservice” in SPO or Automation Cloud.

 

cheers

 

Sven

Translate

rei_dipetersen
Forum|alt.badge.img+4

On prem 2019 does not have “graph”.  As I mentioned, I can update the PictureUrl User Profile property but that doesn’t reformat the picture in the 3 different formats that SP requires.  I may have to write my own program to do this. 

After more research, User Profile pictures are stored in the [MySite App Url]/User Photos/Profile Pictures/

They are stored in the following formats: 

[loginname]_SThumb.jpg  300x300 or less

[loginname]_MThumb.jpg  72x72

[loginname]_LThumb.jpg   48x48

I haven’t been able to find a web service to update on-prem user profiles in bulk.  I think I can upload all of the photos to the user profile photo path, and then update the property to the correct url.  

I am going to investigate graph for SPO updating.  I did find a PNP sample that does a bulk update for SPO but it is a compiled EXE so not possible with Nintex.  

I’m continuing to research...

Translate

rei_dipetersen
Forum|alt.badge.img+4

I found a Graph api call I may be able to use: 

PATCH /me/photo/$value
PATCH /users/{id | userPrincipalName}/photo/$value

PUT /me/photo/$value
PUT /users/{id | userPrincipalName}/photo/$value
const options = {
	authProvider,
};

const client = Client.init(options);

const stream = Binary data for the image;

await client.api('/me/photo/$value')
	.put(stream);

I’m going to play around with this and if I find a solution, I’ll post it here.

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
  • August 21, 2023

Hi @rei_dipetersen 
Please let us know if the graph you found worked for you? 

Translate

rei_dipetersen
Forum|alt.badge.img+4

I never got this to work.  Still trying to figure it out.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings