Access Token Validation Fails

Sravan Kumar Mettu 40 Reputation points
2023-09-25T17:43:15.2233333+00:00
{

    "error": "invalid_grant",

    "error_description": "The audience in ID Token [https://graph.microsoft.com] does not match the expected audience api://APP_ID_URI."

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

Accepted answer
  1. CarlZhao-MSFT 42,031 Reputation points
    2023-09-26T03:21:44.2133333+00:00

    Hi @Sravan Kumar Mettu

    If you are trying to call your custom Web API instead of the Graph API, then when requesting the /token endpoint you should change the value of scope to api://APP_ID, which will return the Web API access token.

    5

    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.

    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.