How can we validate azure authtoken with nodejs

Sakshi Tiwari 0 Reputation points
2024-01-22T11:18:24.6533333+00:00

I want to validate a token that is generated from Azure and pass it to my application, and then I need to validate that token with Node JS. Now, when I am validating an Azure token, it gives an invalid signature every time. When I decode the token, I get to know it is the RS256 algorithm, so what is the issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,939 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
827 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,498 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carlos dos Santos 85 Reputation points Microsoft Regional Director
    2024-01-30T16:05:06.4266667+00:00

    @Sakshi Tiwari Maybe this other post can help you: [https://learn.microsoft.com/en-us/answers/questions/1276299/i-cant-verify-azure-ad-token-in-node-js-web-api-(n](https://learn.microsoft.com/en-us/answers/questions/1276299/i-cant-verify-azure-ad-token-in-node-js-web-api-(n)