question

JiahaoZhang-2472 avatar image
0 Votes"
JiahaoZhang-2472 asked RajeshKumarMSFT-6137 answered

ErrorProfileNotFound exception from graph API

Hi, I'm Jiahao from Microsoft and we are using the graph API to get the MSA user profile. Recently we found that there is an error ErrorProfileNotFound that happens more frequently, could you please help me understand why this error happened and how can we handle this kind of error?

The API is https://graph.microsoft.com/beta/me/photo/$value

One sample response:

{"errorCode":"ErrorProfileNotFound","message":"Exception of type 'Microsoft.Fast.Profile.Core.Exception.ProfileNotFoundException' was thrown.","target":null,"details":null,"innerError":null,"instanceAnnotations":[]}

This is the trend of the exception:

175232-image.png


microsoft-graph-profile
image.png (87.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RajeshKumarMSFT-6137 avatar image
0 Votes"
RajeshKumarMSFT-6137 answered

Hi JiahaoZhang-2472,

Hope you are doing well.

I could you see you are using Beta endpoints to get profilephoto details.

I tried to replicate the same issue at my end ,I am able to get the profile photo details without issue.
https://graph.microsoft.com/v1.0/me/photo/$value.
https://graph.microsoft.com/beta/me/photo/$value.

Refer :- This article to get profile photo details https://docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0

175270-profilephoto.png

Permissions required to get photo details. Refer
175257-permission.png


Hope this helps.

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






profilephoto.png (42.5 KiB)
permission.png (14.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.