How to check if Microsoft Azure App registration is valid and there are no more rights needed?

Meziani, Zina (GBS O2C DE O2I) 0 Reputation points
2023-10-25T09:32:39.4266667+00:00

I m attempting to use the client credentials flow of the OAuth 2.0 protocol to authenticate with the Microsoft Graph API and retrieve emails.

Ive followed the necessary steps, including generating a JWT using a private key and attempting to obtain an access token from Azure AD

However when I try to get the toke, I receive the error

'InvalidAuthenticationToken' with the Message "CompactToken parsing failed with the error code :80049217.

I have ensured that my tenant id, client id and scope are correctly set according to my Azure Ad app registration. Additionally I have uploaded the public certificate (associated with the private key used for signing the JWT)to the app registration in Azure AD

Could you help me understand what might be causind this error and how I can resolve it?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,479 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,635 questions
{count} votes

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.