1
votes

I'm trying to update my profile picture using Microsoft Graph Explorer (v1.0) but I'm unable to do it, I'm always getting the following error :

An internal server error occurred. The operation failed., The file you chose isn't an image. Please choose a different file.

The problem is that the file I'm trying to update my picture with is an image inserted in the request body (a base64 representation of it, I used this site in order to get it: https://www.base64-image.de/).

I'm also using the header Content-Type with the value image/jpeg and I think that, as I'm logged, I don't need the authorization header. The URL I'm using is: https://graph.microsoft.com/v1.0/me/photo/$value

1

1 Answers

1
votes

This endpoint takes the raw image as input, not a base64 encoded version. From the documentation:

Request body

In the request body, include the binary data of the photo in the request body.

Since it isn't possible to stream a file like this using Graph Explorer, updating the photo isn't supported by Graph Explorer.