Our application is registered to Azure, it was working fine. We are checking few things on authencations and we have added some optional claim inside token section. Then our application stopped working. We have removed those things as well But still issue

Anjali Jain 0 Reputation points
2023-11-08T10:24:14.8966667+00:00

Our application is registered to Azure, it was working fine. We are checking few things on authencations and we have added some optional claim inside token section. Then our application stopped working. We have removed those things as well. But, still issue. We are getting issue, 404 error for graph url : https://graph.microsoft.com/v1.0/me/photo/$value

Please suggest what went wrong here.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,997 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,751 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,846 Reputation points Microsoft Employee
    2023-11-18T00:29:15.4266667+00:00

    @Anjali Jain ,

    When you say that the application stopped working, can you clarify in what way it stopped? Are you seeing different error pages? Do you have any logs you could share?

    You mention that you see the 404 error while trying to query a photo via Microsoft Graph. Querying https://graph.microsoft.com/v1.0/me/photo/$value will only return a photo if one exists (photo was added to the contact/added in Azure). Otherwise it will return a 404. It is also possible that the application or user does not have the correct permissions to access the photo, or you do not have the correct scopes to set. Please make sure that you have the scope permission set at least to User.Read , and check that the correct API permissions exist in the app registration.

    Adding optional claims can affect the format of the token and the permissions granted to the application. If the application does not have permissions to access the resource or if the application cannot handle the new format of the token, you may see 404 errors.

    Note also that for Azure AD B2C tenants, retrieving a user's photo using Microsoft Graph is not supported.

    0 comments No comments

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.