reset authentication refresh token revoked after 90 days due to inactivity

BH Prem Kishore 0 Reputation points
2023-08-11T14:39:28.75+00:00

How to remove or reset authentication refresh token that generated using az command is revoked after 90 days due to inactivity.
The following site is mentioned to contact your Microsoft or tenant administrator to change this value. Once the token is revoked, you get a message from the CLI saying you need to sign in again.

https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,296 Reputation points Microsoft Employee Moderator
    2023-08-14T08:07:34.2433333+00:00

    Hi @BH Prem Kishore ,

    Thanks for reaching out.

    When logging into the Azure CLI, the platform retains access and refresh tokens to activate the user session.

    The access token's duration is generally short, typically lasting for one hour. In contrast, refresh tokens lifespan is 90 days in most scenarios, except for Single Page Applications, where they remain valid for 24 hours.

    During this 90-day period, refresh tokens automatically renew themselves with a new token each time they are used, eliminating the need for logins to CLI interactively.

    Starting from January 30, 2021, administrators no longer possess the ability to modify these token lifetimes. (Thanks for bringing this up, I will update the document for the same)

    If your refresh token remains inactive for over 90 days and subsequently is revoked, the CLI will notify you, prompting you to re-initiate the sign-in process by entering the credentials again.

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.

    1 person found this answer helpful.

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.