Microsoft 365 sign-in (Entra ID)

AADSTS50173: the provided grant has expired due to it being revoked

AADSTS50173 means the refresh token an app used was revoked, often after a password change or reset. How users sign in again and how developers handle it.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

AADSTS50173 means an application tried to use a refresh token that is no longer valid because it was revoked. Microsoft's message says the provided grant has expired due to it being revoked and a fresh auth token is needed. It adds that the user might have changed or reset their password, and shows two dates: when the grant was issued, and the TokensValidFrom date for the user, before which tokens are not valid.

Apps use refresh tokens to stay signed in without asking for a password every time. When something invalidates the refresh tokens issued to a user, any app still holding an older token gets AADSTS50173 the next time it tries to refresh, and the user has to sign in again. In most cases this is the expected result of a security event, not a fault.

Common causes

Microsoft's AADSTS50173 article lists three causes:

  • The user changes or resets their password.
  • The refresh token expires.
  • An administrator revokes the refresh token.

How to fix it

1. Sign in to the app again

On the application that shows the error, look for an option to reauthenticate or to clear cached token information. Microsoft's article says you can also do this by signing out of the application and signing back in, where that option is available. Use your current password.

2. Check whether a password change explains it

Compare the TokensValidFrom date in the error with the time you last changed or reset your password. If they line up, the error is expected and step 1 is the fix. As a general step, update the password in any other app or device that still uses the old one, such as a phone mail app, so it does not keep failing.

3. Admins: check for a token revocation

If the user did not change their password, an administrator may have revoked the user's sessions, for example during a security investigation. Microsoft's article links to its guidance on revoking user access in Microsoft Entra ID. As a general step, check the audit logs for the user before treating the error as a problem; if the revocation was deliberate, the user simply signs in again.

4. Developers: handle the error by requesting a new sign-in

If the application uses the Microsoft Authentication Library (MSAL), follow Microsoft's guidance for handling errors and exceptions in MSAL. If it does not use MSAL, Microsoft recommends following the same guidance and implementing a similar approach. The goal is to ask the user to reauthenticate and obtain a fresh token, not to retry the revoked refresh token.

If nothing works

As a general step, if the user signs in successfully elsewhere but one app keeps showing AADSTS50173, remove and re-add the account in that app or clear its stored data so it requests a fresh token. Microsoft's article also points to the login.microsoftonline.com/error lookup page for individual errors.

What we checked

Two Microsoft Learn pages were read on 2026-11-21. The Microsoft Entra error code reference gives the AADSTS50173 message, including the grant issue date and TokensValidFrom date. The dedicated AADSTS50173 troubleshooting article lists the password change, token expiry and admin revocation causes, the steps for users, and the MSAL error handling guidance for developers. The error was not reproduced for this page.

Last checked: 2026-11-21.

Official sources

Questions people ask

What does AADSTS50173 mean?

The refresh token (grant) the app presented was revoked, so Microsoft Entra ID needs a fresh sign-in. The error shows when the grant was issued and the TokensValidFrom date before which the user's tokens are not valid.

Why did AADSTS50173 start right after I changed my password?

Microsoft lists a password change or reset as a cause: it revokes the refresh tokens issued before it, so apps that cached the old token must sign you in again.

How do I fix AADSTS50173 as a user?

Look for an option in the app to reauthenticate or clear cached token information, or sign out of the app and sign back in, as Microsoft's article describes.

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.