{
  "id": "api/oauth2-error-invalid-grant-azure-ad",
  "signature": "AADSTS700082: The refresh token has expired due to inactivity.",
  "signature_zh": "AADSTS700082：刷新令牌因不活动而过期。",
  "regex": "AADSTS700082",
  "domain": "api",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The refresh token was not used within the allowed inactivity window (typically 90 days for Azure AD), causing the token to be revoked by the authorization server.",
  "root_cause_type": "generic",
  "root_cause_zh": "刷新令牌在允许的不活动窗口内未被使用（Azure AD 通常为 90 天），导致授权服务器撤销了该令牌。",
  "versions": [
    {
      "version": "Microsoft Authentication Library (MSAL) 4.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure SDK for .NET 1.14.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure SDK for Python 1.28.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure AD v2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The token is permanently expired; reusing it will always fail.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The refresh token is stored on the server side, not client-side cache.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The inactivity timeout is a separate setting; increasing lifetime does not affect inactivity expiration.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Acquire a new authorization code by redirecting the user to the login endpoint. In MSAL, use acquireTokenSilent with a fresh login hint. Code example: msalInstance.acquireTokenRedirect({ scopes: ['User.Read'], loginHint: user.email })",
      "success_rate": 0.95,
      "how": "Acquire a new authorization code by redirecting the user to the login endpoint. In MSAL, use acquireTokenSilent with a fresh login hint. Code example: msalInstance.acquireTokenRedirect({ scopes: ['User.Read'], loginHint: user.email })",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement a token refresh schedule that proactively refreshes within the inactivity window (e.g., every 60 days) using a background job. In Python, use msal's ConfidentialClientApplication with acquire_token_silent.",
      "success_rate": 0.9,
      "how": "Implement a token refresh schedule that proactively refreshes within the inactivity window (e.g., every 60 days) using a background job. In Python, use msal's ConfidentialClientApplication with acquire_token_silent.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure Azure AD to extend the refresh token inactivity timeout (up to 365 days) via conditional access policies.",
      "success_rate": 0.85,
      "how": "Configure Azure AD to extend the refresh token inactivity timeout (up to 365 days) via conditional access policies.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Acquire a new authorization code by redirecting the user to the login endpoint. In MSAL, use acquireTokenSilent with a fresh login hint. Code example: msalInstance.acquireTokenRedirect({ scopes: ['User.Read'], loginHint: user.email })",
    "Implement a token refresh schedule that proactively refreshes within the inactivity window (e.g., every 60 days) using a background job. In Python, use msal's ConfidentialClientApplication with acquire_token_silent.",
    "Configure Azure AD to extend the refresh token inactivity timeout (up to 365 days) via conditional access policies."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/azure/active-directory/develop/refresh-tokens",
  "official_doc_section": null,
  "error_code": "AADSTS700082",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-06-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}