Not able to upload an image to this url from postman PUT https://graph.microsoft.com/v1.0/users/31fc68b3-57e5-4812-83e9-a6859392b5e0/photo/$value

nas shk 0 Reputation points
2024-09-11T16:19:32.7733333+00:00

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,970 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 41,616 Reputation points
    2024-09-13T10:32:34.4766667+00:00

    Hi @nas shk

    I just did a quick test locally, and it worked well.

    User's image

    Please ensure your context meets the following requirements:

    • Ensure the photo you are uploading is less than 4 MB in size.
    • Ensure you have the necessary permissions. If you are using "delegated permissions", make sure you are logged in as a Global Administrator or User Administrator to obtain the access token. If you are using "application permissions", make sure they are either ProfilePhoto.ReadWrite.All or User.ReadWrite.All.
    • Ensure the audience of your access token is the MS Graph API, not another API. You can decode the token and check the aud claim.
    • Ensure your tenant is not an Azure AD B2C. The Azure AD B2C tenants currently do not support updating user photos using the Microsoft Graph API.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.