Token Limit Graph

DanielK 20 Reputation points
2023-04-18T07:13:43.45+00:00

We are using Graph API, but token is getting expired quickly. So, my question is, is it possible to get a token with longer life span. Can anyone help!

Microsoft Security | Microsoft Authenticator
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,406 Reputation points
    2023-04-18T08:26:27.87+00:00

    Hi @DanielK

    You can create a token lifetime policy for your organization's tenant to extend the lifetime of an access token, but not for a maximum to 24 hours. User's image

    User's image

    If isOrganizationDefault is set to true, then the policy will be activated as the tenant's unique token policy, i.e. all apps in the tenant will follow this policy.

    If you only want to set a token policy for tokens for a specific app, you can set isOrganizationDefault to false and assign this policy to a specific app. User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.