I am trying to create a power automate flow that when a sharepoint list to a certain value, it will send an http request (post) to microsoft graph api to upload a picture. This is the graph api url. PATCH /users/{id | userPrincipalName}/photo/$value.
The issues is i am trying to fetch the Binary data for the image. I am not to sure what i am required or what sharepoint will give me.
Any tutorial or way to fetch that binary data?
Update:
I found this tutorial: https://www.youtube.com/watch?v=gg66XkEG7xQ
So i found the content, i believe i just need to encode the content using base64 function and send this has my http value. Will check this. If anyone has done that part. thanks for any input.
Update 2:
Following this tutorial: https://www.youtube.com/watch?v=GxY0RV5iGAY
I am almost able to update the photo of a user. However i received this error when running it.
Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileBadRequestException' was thrown.

Report
All responses (
Answers (