3
votes

I'm having trouble updating and getting user's profile photos using the Microsoft Graph API.

For example, sending a PATCH request to https://graph.microsoft.com/v1.0/users/[userId]/photo/$value, including correct Authorization and Content-Type headers, with the image binary data in the request body, results in an error response with the code "UnknownError" and an empty message.

Getting user photos results in the same error.

Is there a way to get a more detailed error message? Any ideas on what could be the cause of the error? Are there any known issues with getting/updating photos with the API?

The users for which I'm trying to get/update photos for exist only in an Azure AD. They do not have an Exchange online mailbox. Is that a requirement for using get get/update photo queries in Microsoft Graph?

1

1 Answers

4
votes

Thanks for reporting this issue. Currently, the API only serves photos for users with Exchange online mailbox. We are working on supporting the API for AAD only users as well. Let us know the impact this has on your work and it would help us prioritize it better.

The feedback on returning more meaningful is noted. It would be great if you can share request-id and timestamp present in body of the error response.