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
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 dMySite App Url]/User Photos/Profile Pictures/
They are stored in the following formats:
:loginname]_SThumb.jpg 300x300 or less
lloginname]_MThumb.jpg 72x72
7loginname]_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...
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.
Hi @rei_dipetersen
Please let us know if the graph you found worked for you?
I never got this to work. Still trying to figure it out.