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.
"code":"InvalidAuthenticationToken","message":"Invalid x5t claim."
ahmed shoaib
31
Reputation points
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."

Can anyone tell me the whats wrong with my process?
Thanks in Advance.
Microsoft Security | Microsoft Graph
Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
Answer accepted by question author
-
JosephXu-MSFT 531 Reputation points2021-07-28T02:13:03.953+00:00