About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A user who was signed in to an application is suddenly asked to sign in again, or the application fails outright, with error AADSTS50173. The message says a fresh authentication token is needed, that the user might have changed or reset their password, and gives two dates. The error is the platform doing what it is built to do: the refresh token that kept the session alive is no longer valid, and the application must ask the user to sign in again.
Nothing before the Fix section changes anything.
What the error means
Microsoft's page gives the full message with placeholders where the dates go:
AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password. The grant was issued on '{authTime}' and the TokensValidFrom date (before which tokens are not valid) for this user is '{validDate}'.
The cause on the page: the refresh token used for authentication was revoked. The page lists three ways that happens:
- The user changes or resets their password.
- The refresh token expires.
- An administrator revokes the refresh token.
Microsoft's refresh token page explains the mechanism. When a client acquires an access token it also receives a refresh token, and the refresh token is used to get a new access and refresh token pair when the access token expires. Refresh tokens "can be revoked by the sign-in service at any time before their expiration", and an application should handle that by sending the user to an interactive sign-in. The default lifetimes on that page are 24 hours for single-page applications, 24 hours for apps that use email one-time passcode authentication flow, and 90 days for all other scenarios.
Likely causes
| Cause | Source of the revocation | Applies to |
|---|---|---|
| The user changed or reset their password | Password change, self-service password reset, or an administrator resetting the password | Tokens that depend on a password; Microsoft's table lists which kinds survive |
| The refresh token reached its lifetime | 24 hours for single-page applications and email one-time passcode flows, 90 days for other scenarios | Any client that has not signed in again within the period |
| An administrator revoked the user's refresh tokens | "Revoke sessions" in the admin centre, or the PowerShell command Microsoft shows | All of the user's tokens |
| A single sign-out | A sign-out from one app can revoke tokens of some kinds | Microsoft's table shows which kinds stay alive |
Microsoft's refresh token page adds a table of which changes revoke which kind of token. A few of its rows, in plain words: when a user changes their own password, password-based cookies and tokens are revoked, while non-password-based tokens and confidential client tokens stay alive. When a user revokes their refresh tokens, or an administrator revokes all refresh tokens for a user, every kind in the table is revoked. When a password merely expires, none of them is revoked. The page also notes that refresh tokens are not revoked for B2B (guest) users in their resource tenant, and that the token needs to be revoked in the home tenant.
Prove the cause before changing anything
All of these only read.
- Take the two dates from the message. The grant was issued on the first one, and the second is the TokensValidFrom date, before which tokens are not valid for this user. If the grant date is earlier than the TokensValidFrom date, the token predates a revocation, which is exactly what the message says.
- Ask what happened to the user's account at or just before the TokensValidFrom time. Did the user change or reset the password? Did an administrator reset it? Did someone select Revoke sessions on the user in the Microsoft Entra admin center, or run the Graph PowerShell command
Revoke-MgUserSignInSession? Microsoft's revocation page gives both routes among its steps for removing a user's access. - Check how long the user has been inactive. If the application is a single-page application, a 24-hour lifetime applies; for other applications the default is 90 days.
- Find out whether the application uses the Microsoft Authentication Library (MSAL). Microsoft's page separates guidance for users from guidance for application developers on that point.
Example (illustrative): at contoso.com.au the payroll web application signs a user out with AADSTS50173 on Tuesday morning. The message shows a grant issued on Monday and a TokensValidFrom date of Tuesday 8:10 am. The service desk confirms the user's password was reset at 8:10 am after a lost-phone report. The grant predates the reset, so the revocation is the explanation.
Fix
Microsoft's page has two sets of steps, one for users and one for application developers.
For users
On the application that has the problem, Microsoft says to find an option to reauthenticate or to clear any cached token information. You can also perform these actions by signing out and signing back in to the application, if that applies or is available.
Before you start, save any work in the application, because signing out can end the session.
Disruptive step: The next step signs the user out of the application and clears the cached sign-in. Anything unsaved in the application can be lost, and the user must sign in again.
Sign out of the application, close it, then sign in again with the user's current password.
To undo it: there is nothing to revert, because no setting changed. The new sign-in replaces the revoked token, and signing in again is the only way back into the application.
For application developers
If the application uses MSAL, Microsoft's page points to its guidance for handling errors and exceptions in MSAL. If it does not, the page says to follow the same guidance and try to implement a similar approach. The goal is stated plainly: to request that the user reauthenticate and obtain a fresh token. An application that treats AADSTS50173 as a fatal error, and not as a request for interactive sign-in, is the fault to correct.
Microsoft's refresh token page adds two points for developers. Refresh tokens replace themselves with a fresh token on every use, and the platform doesn't revoke old refresh tokens when they are used to fetch new access tokens, so the page says to securely delete the old refresh token after acquiring a new one. For a redirect URI registered as spa, refresh tokens expire after 24 hours, and apps must be prepared to rerun the authorization code flow using an interactive authentication to get a new refresh token every 24 hours. The page says users don't have to enter their credentials and usually don't even see any related user experience, just a reload of the application.
For administrators
Microsoft's AADSTS50173 page gives no administrator change. If the revocation was not wanted, for example a Revoke sessions selection made by mistake, nothing restores the revoked tokens, and the user signs in again. Microsoft's revocation page lists revoking sessions among the steps for ending a user's access, and its AADSTS50173 page names an administrator revoking the refresh token as one of three causes.
Confirm the fix
- The user signs in again and reaches the application with no AADSTS50173.
- A later sign-in a day later or after the next token renewal still works. If the error returns, a process is revoking the user's tokens repeatedly.
- For a developer fix, the application sends the user to an interactive sign-in when the error occurs, and then continues.
What to watch afterwards
- Applications that fail with AADSTS50173 and stay failed. They are not handling the revocation as Microsoft's page says they should.
- Any scheduled password reset or clean-up job that revokes tokens for many users at once. The error will then appear for many people at the same time.
- Single-page applications and email one-time passcode flows, where the 24-hour lifetime means a fresh sign-in each day is expected.
- How long a revoked user keeps access. Microsoft's revocation page says that after an administrator revokes access the user can't gain new tokens, that an application using access tokens loses access when the access token expires, and that an application using session tokens ends existing sessions when the token expires, so the error can appear some time after the revocation.
- Guest users, where the revocation must happen in the home tenant, not the resource tenant, per Microsoft's note.
Read next
Related articles you may want next.
- TroubleshootingAADSTS7000222: 'The provided client secret keys are expired' when a server application stops signing inAADSTS7000222 client secret keys are expired: confirm the end date, add a new secret or certificate to the app registration and roll it over safely.Read article
- TroubleshootingAADSTS53003: Access has been blocked by Conditional Access policies — finding which policy blocked the sign-inAADSTS53003 BlockedByConditionalAccess: read the Entra sign-in log, find the policy that blocked the user, test with What If and change it safely.Read article
- HostingRevoke a Departed Administrator's Access Across a Hosted EstateAdministrator left? Inventory every route first, then disable AD and Entra accounts, revoke sessions, remove vCenter and ESXi permissions, SSH keys and shared secrets, with evidence.Read article
Risks and limits
These steps have not been run or lab-tested.
Microsoft's AADSTS50173 page gives no version range and no step for administrators. The lifetimes quoted are the defaults on the refresh token page, and the page says tokens can be revoked before expiry, so a shorter lifetime is possible. The table of which changes revoke which kind of token is Microsoft's, dated 2025-11-05, and a changed table would change the answer, so check the current page. Microsoft's pages do not explain how to find the TokensValidFrom value outside the error message.
Sources
- Error AADSTS50173 - The provided grant has expired due to it being revoked — Microsoft Learn, page dated 2026-01-28, accessed 1 December 2026
- Refresh tokens in the Microsoft identity platform — Microsoft Learn, page dated 2025-11-05, accessed 1 December 2026
- Revoke user access in Microsoft Entra ID — Microsoft Learn, page dated 2026-06-19, accessed 1 December 2026
This article was originally published on .