[Microsoft Graph] PUT/PATCH profilePhoto not working on newly created users?

_jeroen_ 6 Reputation points
2023-01-10T07:43:36.727+00:00

This is more a sanity check than a real question, I guess.

I created a user in Azure AD through the GRAPH API, and assigned them the correct licenses so a mailbox is created. Checking in the admin center, I can see that user has a valid mailbox.

Next, when I PUT/PATCH a profile picture to said user (through FLOW), I get a 200 SUCCES. However, their profile picture is never updated.

Pushing the same Profile Picture through the same FLOW to my test-user who already has logged in the past, works flawlessly and super fast. So, the only difference I can find between my new user and my test-user is one login.

Can someone confirm PUT/PATCH photo only works when a user logged in at least only once? Because the documentation is rather poor...


additional information:

https://graph.microsoft.com/v1.0/users/**newlyCreated.User[@](/users/na/?userId=a28c79c1-c609-48db-b55f-1783d1187afb).com**/photo/$value fails:

  • statuscode: 404
  • "errorCode": "EnterpriseEntityNotFound",
  • "message": "Accessing identity not a consumer, so async provisioning of mailbox (a.k.a. 'shard') for target identity was aborted",

https://graph.microsoft.com/v1.0/users/**objectID**/photo/$value "works" (I guess?):

  • statuscode: 200

the EnterpriseEntityNotFound is what took me to another thread about ProfilePicture, in which I found that the mailbox has to be provisioned for GRAPH to work. Which, as you can read above, seems to be the case...

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

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,946 Reputation points
    2023-01-23T22:03:13.9+00:00

    Hi @_jeroen_
    Apologize for delay in response.
    I have tried to replicate the same scenario but it's working as expected. Its look like tenant specific issue, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    **http://aad.portal.azure.com**or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

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

    0 comments No comments