问题
I cannot upload a photo from Microsoft Graph Explorer. I am getting this error:
An internal server error occurred. The operation failed., The file you chose isn't an image.
I have image/jpeg as content-type and a valid binary data extracted from Fiddler. Authorization token is also there when I inspect my request from Fiddler.
What did I missed?
Request body: https://pastebin.com/YDUfpRmX
Response: https://pastebin.com/e6fzDYvi
PUT https://graph.microsoft.com/beta/users/[userprincipalName]/photo/$value HTTP/1.1 Content-Length: 64408 Authorization: Bearer eyJ0eXA... Content-Type: image/jpeg
回答1:
Graph Explorer doesn't support sending binary files at the moment. It can only handle string data in the POST/PUT/PATCH body.
来源:https://stackoverflow.com/questions/46181102/uploading-profile-photo-from-microsoft-graph-explorer