"code":"InvalidAuthenticationToken","message":"Invalid x5t claim."

ahmed shoaib 31 Reputation points
2021-07-28T00:09:19.55+00:00

I have create new app from Microsoft Azure app registration and put my credential to my oauth2 configuration.Where first i have taken the authorization token and then access token of a signed-in user and got a access token but this access token when i am using for API call simple /me its showing the following error:

"code":"InvalidAuthenticationToken","message":"Invalid x5t claim."

118453-config.png118414-invalid-auth-token.png

Can anyone tell me the whats wrong with my process?

Thanks in Advance.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

Answer accepted by question author
  1. JosephXu-MSFT 531 Reputation points
    2021-07-28T02:13:03.953+00:00

    Hi @ahmed shoaib , you should change your 'scope' property value to env('OAUTH_APP_ID','https://graph.microsoft.com/.default'). Because only the access_token from the Microsoft graph scope is authorized to access Microsoft graph api.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.