ErrorProfileNotFound exception from graph API

Jiahao Zhang 21 Reputation points
2022-02-17T03:37:26.573+00:00

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 Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. RajeshKumarMSFT 1,976 Reputation points Microsoft External Staff
    2022-02-17T07:52:00.703+00:00

    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://learn.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".

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.