I need to validate the auth token, from azure ad

Rafael Massinatore 21 Reputation points

Hi, I am authenticating the user of my SPA application, I followed:

I received the token, but I would like to verify in java, if this token is the right one, but I am not finding how I can do this, any help on how I can verify the backend with this token

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,552 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,471 Reputation points


    Below post explain how to validate JWT issued by Azure AD in java script:


    You have to pay attention to the aud claim and properly check the signature.

    Hope this helps!

    1 person found this answer helpful.
    0 comments No comments

  2. Alfredo Revilla (MSFT) 26,816 Reputation points

    Hello @Rafael Massinatore , for a generic approach take a look to Validate JWT tokens using JWKS in Java.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    0 comments No comments