invalid_grant - The provided grant has expired due to it being revoked

vault 11 Reputation points
2021-03-23T16:04:52.057+00:00

Hello everyone,

I tried to contact MS support team and they just redirected me here and closed the ticket. I'm integrating MS Teams in our product. We have a verified OAuth app and during the authorize call, we are asking the following scopes to the user: OnlineMeetings.ReadWrite User.Read offline_access
A user is getting the following error when refreshing the token:

{
  "error": "invalid_grant",
  "error_description": "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 '2021-02-16T02:58:58.7240000Z' and the TokensValidFrom date (before which tokens are not valid) for this user is '2021-03-19T03:41:25.0000000Z'.\r\nTrace ID: 00271936-7745-4296-afbb-3e06e9060101\r\nCorrelation ID: 1df21bd3-0cd3-4469-8ec3-a3064e2b8fef\r\nTimestamp: 2021-03-22 09:49:15Z",
  "error_codes": [
    50173
  ],
  "timestamp": "2021-03-22 09:49:15Z",
  "trace_id": "00271936-7745-4296-afbb-3e06e9060101",
  "correlation_id": "1df21bd3-0cd3-4469-8ec3-a3064e2b8fef",
  "error_uri": "https://login.microsoftonline.com/error?code=50173"
}

What does that mean and how do I remediate it? Is it a problem on MS side? Do I need to reauthenticate the user?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,474 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Diana Wanjuhi 1,376 Reputation points
    2021-03-24T14:53:39.537+00:00

    Hello @vault this error means that the token has expired and needs to be refreshed. Kindly have the user sign in again using fresh credentials.

    I hope this helps.


  2. Fernandes, Wilson 1 Reputation point
    2023-01-03T21:57:58.173+00:00

    Windows pwd change will cause this issue, use az login to force change the new creds using command line.

    0 comments No comments