How to get Access Token Version 2.0

TestProfile 0 Reputation points
2023-04-27T04:12:23.39+00:00

Hi, I'm not able to get v2.0 access token. It always return v1.0 access token.
as mentioned in docs This depends on the value of "accessTokenAcceptedVersion" parameter in the Manifest section we have updated it to "2" still we are seeing version 1.0 in our access token

This is the endpoint which we have used:https://login.microsoftonline.com/3e889401-476e-489a-9d84-07f623ee08a4/v2.0/.well-known/openid-configuration

User's image

User's image

Could you please help what I am missing here or is there any other value I need to set in manifest to get V2.0.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2023-04-28T11:06:44.91+00:00

    @TestProfile

    Thanks for reaching out.

    You have to make sure the accessTokenAcceptedVersion is set to 2 for the resource app (Web API) for which you are requesting the access token, and you need specify your resource app (Web API) as audience in the scope parameter while requesting token (For an example: scope=https://contosoApp.com/tasks.read ) as shown below, but if you use Microsoft web-hosted resources in the scope parameter such as Microsoft Graph: https://graph.microsoft.com / Microsoft SharePoint: https://microsoft.sharepoint-df.com etc.., then V2.0 version token doesn't support yet.

    152519-untitled.png

    Outcome from my tenant Tenant:

    An access token request call and decoded V2.0 version token

    152614-image.png

    152555-image.png

    Let me know if you have any further questions.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.