{
  "schemaVersion": "1.0",
  "code": "700082",
  "name": "ExpiredOrRevokedGrantInactiveToken",
  "title": "AADSTS700082: The refresh token has expired due to inactivity",
  "url": "https://brambrinkmeier.com/entra/aadsts/700082/",
  "alternates": {
    "markdown": "https://brambrinkmeier.com/entra/aadsts/700082.md",
    "json": "https://brambrinkmeier.com/api/aadsts/700082.json",
    "html": "https://brambrinkmeier.com/entra/aadsts/700082/"
  },
  "description": "AADSTS700082: a refresh token expired from inactivity. An expected lifecycle event with low attack value; stolen idle tokens fail here too. KQL.",
  "summary": "AADSTS700082 means an app tried to use a refresh token that expired because nobody used it for too long. Microsoft calls it an expected part of the token lifecycle, so it has low attack value. One useful reading: a stolen refresh token that sat unused long enough fails here too. Hunt it in AADNonInteractiveUserSignInLogs with ResultType == \"700082\".",
  "inMicrosoftReference": true,
  "unlistedChecked": null,
  "meaningText": "Microsoft's description:\n\n> **ExpiredOrRevokedGrantInactiveToken**: The refresh token has expired due to inactivity. The token was issued on {issueDate} and was inactive for {time}. Expected part of the token lifecycle - the user went an extended period of time without using the application, so the token was expired when the app attempted to refresh it.\n\nA sibling in the same table, **70008 ExpiredOrRevokedGrant**, reads *\"The refresh token has expired due to inactivity.\"*\n\nThe token wasn't revoked and no policy fired. It sat unused until it expired. The message tells you when it was issued and how long it was inactive.",
  "sections": [
    {
      "heading": "What does AADSTS700082 mean?",
      "text": "Microsoft's description:\n\n> **ExpiredOrRevokedGrantInactiveToken**: The refresh token has expired due to inactivity. The token was issued on {issueDate} and was inactive for {time}. Expected part of the token lifecycle - the user went an extended period of time without using the application, so the token was expired when the app attempted to refresh it.\n\nA sibling in the same table, **70008 ExpiredOrRevokedGrant**, reads *\"The refresh token has expired due to inactivity.\"*\n\nThe token wasn't revoked and no policy fired. It sat unused until it expired. The message tells you when it was issued and how long it was inactive."
    },
    {
      "heading": "Is it an attack?",
      "text": "See the [comparison of the codes behind \"asked to sign in again\"](https://brambrinkmeier.com/guides/why-user-asked-to-sign-in-again-entra-id/) (70043, 700082, 50173, 50133, 50076).\n\nNo. Microsoft's own description says it is *\"Expected part of the token lifecycle\"*. Typical sources are a laptop that was off for weeks, an app the user rarely opens, or a phone that came back from a drawer.\n\n| Pattern | Likely meaning |\n|---|---|\n| 700082 from a user's known device, then an interactive success | The user came back to an app after a long break. Benign. |\n| 700082 from an IP or device the user hasn't used recently | Someone presented an old refresh token from an unfamiliar place. Reasoning, not a documented detection: if that token was stolen, the expiry is what stopped it. Worth a short look. |\n| Steady 700082 from a service or shared device | A client that holds tokens but rarely uses them. Configuration, not attack. |\n\n**The useful negative example:** a stolen refresh token is only valuable while it is used. One that the attacker left dormant long enough fails with 700082 rather than giving them access. That is the token lifetime working in your favour, not a detection you can rely on.\n\n**IP caveat for confidential clients.** Microsoft's [non-interactive sign-ins page](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-noninteractive-sign-ins) says: *\"The IP address of non-interactive sign-ins performed by confidential clients doesn't match the actual source IP of where the refresh token request is coming from. Instead, it shows the original IP used for the original token issuance.\"* So an unfamiliar IP on a 700082 row is a meaningful signal mainly for public clients (desktop, mobile and browser apps). For confidential clients it may only show where the token was first issued, and the second query below inherits that limit."
    },
    {
      "heading": "How do I find it in my logs (KQL)?",
      "text": "Baseline by app:\n\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700082\"\n| summarize Rows = count(), Users = dcount(UserPrincipalName) by AppDisplayName\n| sort by Rows desc\n```\n\n700082 from an IP where the same user had no successful sign-in in the previous 30 days:\n\n```kusto\nlet lookback = 30d;\nlet knownUserIPs =\n    union\n        (SigninLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType),\n        (AADNonInteractiveUserSignInLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType)\n    | where TimeGenerated > ago(lookback)\n    | where ResultType == \"0\"\n    | distinct UserPrincipalName, IPAddress;\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(1d)\n| where ResultType == \"700082\"\n| join kind=leftanti knownUserIPs on UserPrincipalName, IPAddress\n| extend Device = parse_json(DeviceDetail), Location = parse_json(LocationDetails)\n| project TimeGenerated, UserPrincipalName, IPAddress,\n          Country = tostring(Location.countryOrRegion),\n          OS = tostring(Device.operatingSystem),\n          AppDisplayName, UserAgent, ResultDescription\n| sort by TimeGenerated desc\n```\n\nExpect some benign hits here: a user who was away for more than the lookback period has no recent \"known\" IPs to match. `ResultType` is a **string** column, so compare it with `\"700082\"`, not `700082`. `DeviceDetail` and `LocationDetails` are strings in this table, hence `parse_json`."
    },
    {
      "heading": "How does Conditional Access affect it?",
      "text": "- No Conditional Access policy causes 700082. It is token inactivity, not a session control. If a sign-in frequency policy refused the token, you would see [70043](https://brambrinkmeier.com/entra/aadsts/70043/) instead.\n- The interactive sign-in that follows goes through MFA and Conditional Access as normal."
    },
    {
      "heading": "How do I fix AADSTS700082?",
      "text": "**For the user:** sign in again.\n\n**For admins:**\n1. Nothing to fix. Exclude 700082 from failure-rate dashboards, or it inflates them.\n2. If the second query returns an IP you can't explain for a user, check that user's other sign-ins from it. A token that failed here may have a sibling that didn't."
    }
  ],
  "microsoftWording": {
    "text": "**ExpiredOrRevokedGrantInactiveToken**: The refresh token has expired due to inactivity. The token was issued on {issueDate} and was inactive for {time}. Expected part of the token lifecycle - the user went an extended period of time without using the application, so the token was expired when the app attempted to refresh it.",
    "source": "Microsoft's error code reference, as quoted on the page",
    "sourceUrl": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes"
  },
  "securityReading": {
    "category": {
      "id": "token",
      "label": "Tokens and sessions"
    },
    "kind": {
      "id": "failure",
      "label": "Failure"
    },
    "attackSignal": {
      "level": "low",
      "label": "Low: usually configuration or user error"
    },
    "mitre": [],
    "tables": [
      "AADNonInteractiveUserSignInLogs"
    ],
    "isItAnAttack": "See the [comparison of the codes behind \"asked to sign in again\"](https://brambrinkmeier.com/guides/why-user-asked-to-sign-in-again-entra-id/) (70043, 700082, 50173, 50133, 50076).\n\nNo. Microsoft's own description says it is *\"Expected part of the token lifecycle\"*. Typical sources are a laptop that was off for weeks, an app the user rarely opens, or a phone that came back from a drawer.\n\n| Pattern | Likely meaning |\n|---|---|\n| 700082 from a user's known device, then an interactive success | The user came back to an app after a long break. Benign. |\n| 700082 from an IP or device the user hasn't used recently | Someone presented an old refresh token from an unfamiliar place. Reasoning, not a documented detection: if that token was stolen, the expiry is what stopped it. Worth a short look. |\n| Steady 700082 from a service or shared device | A client that holds tokens but rarely uses them. Configuration, not attack. |\n\n**The useful negative example:** a stolen refresh token is only valuable while it is used. One that the attacker left dormant long enough fails with 700082 rather than giving them access. That is the token lifetime working in your favour, not a detection you can rely on.\n\n**IP caveat for confidential clients.** Microsoft's [non-interactive sign-ins page](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-noninteractive-sign-ins) says: *\"The IP address of non-interactive sign-ins performed by confidential clients doesn't match the actual source IP of where the refresh token request is coming from. Instead, it shows the original IP used for the original token issuance.\"* So an unfamiliar IP on a 700082 row is a meaningful signal mainly for public clients (desktop, mobile and browser apps). For confidential clients it may only show where the token was first issued, and the second query below inherits that limit.",
    "conditionalAccess": {
      "heading": "How does Conditional Access affect it?",
      "text": "- No Conditional Access policy causes 700082. It is token inactivity, not a session control. If a sign-in frequency policy refused the token, you would see [70043](https://brambrinkmeier.com/entra/aadsts/70043/) instead.\n- The interactive sign-in that follows goes through MFA and Conditional Access as normal."
    }
  },
  "kql": [
    {
      "title": null,
      "leadIn": "Baseline by app:",
      "query": "AADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700082\"\n| summarize Rows = count(), Users = dcount(UserPrincipalName) by AppDisplayName\n| sort by Rows desc"
    },
    {
      "title": null,
      "leadIn": "700082 from an IP where the same user had no successful sign-in in the previous 30 days:",
      "query": "let lookback = 30d;\nlet knownUserIPs =\n    union\n        (SigninLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType),\n        (AADNonInteractiveUserSignInLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType)\n    | where TimeGenerated > ago(lookback)\n    | where ResultType == \"0\"\n    | distinct UserPrincipalName, IPAddress;\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(1d)\n| where ResultType == \"700082\"\n| join kind=leftanti knownUserIPs on UserPrincipalName, IPAddress\n| extend Device = parse_json(DeviceDetail), Location = parse_json(LocationDetails)\n| project TimeGenerated, UserPrincipalName, IPAddress,\n          Country = tostring(Location.countryOrRegion),\n          OS = tostring(Device.operatingSystem),\n          AppDisplayName, UserAgent, ResultDescription\n| sort by TimeGenerated desc"
    }
  ],
  "kqlSectionText": "Baseline by app:\n\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(7d)\n| where ResultType == \"700082\"\n| summarize Rows = count(), Users = dcount(UserPrincipalName) by AppDisplayName\n| sort by Rows desc\n```\n\n700082 from an IP where the same user had no successful sign-in in the previous 30 days:\n\n```kusto\nlet lookback = 30d;\nlet knownUserIPs =\n    union\n        (SigninLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType),\n        (AADNonInteractiveUserSignInLogs | project TimeGenerated, UserPrincipalName, IPAddress, ResultType)\n    | where TimeGenerated > ago(lookback)\n    | where ResultType == \"0\"\n    | distinct UserPrincipalName, IPAddress;\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(1d)\n| where ResultType == \"700082\"\n| join kind=leftanti knownUserIPs on UserPrincipalName, IPAddress\n| extend Device = parse_json(DeviceDetail), Location = parse_json(LocationDetails)\n| project TimeGenerated, UserPrincipalName, IPAddress,\n          Country = tostring(Location.countryOrRegion),\n          OS = tostring(Device.operatingSystem),\n          AppDisplayName, UserAgent, ResultDescription\n| sort by TimeGenerated desc\n```\n\nExpect some benign hits here: a user who was away for more than the lookback period has no recent \"known\" IPs to match. `ResultType` is a **string** column, so compare it with `\"700082\"`, not `700082`. `DeviceDetail` and `LocationDetails` are strings in this table, hence `parse_json`.",
  "fix": {
    "short": "Nothing to fix: the token expired from inactivity. User: sign in again. Admin: exclude 700082 from failure-rate dashboards. If it comes from an IP you can't explain for that user, check the user's other sign-ins from that IP.",
    "steps": "**For the user:** sign in again.\n\n**For admins:**\n1. Nothing to fix. Exclude 700082 from failure-rate dashboards, or it inflates them.\n2. If the second query returns an IP you can't explain for a user, check that user's other sign-ins from it. A token that failed here may have a sibling that didn't."
  },
  "labReproduced": null,
  "labSectionText": null,
  "labRuns": [
    {
      "date": "2026-10-30",
      "run": "round 7",
      "method": "token-endpoint requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/71",
      "scenario": "Refresh token after the admin revoked sessions",
      "expected": "50173 / 700082 / 50076",
      "got": "50173",
      "matchedExpectation": true,
      "message": "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 gran"
    },
    {
      "date": "2026-10-31",
      "run": "round 8",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/72",
      "scenario": "Refresh token after the admin revoked sessions",
      "expected": "50173 / 700082 / 50076",
      "got": "50173",
      "matchedExpectation": true,
      "message": "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 gran"
    },
    {
      "date": "2026-10-31",
      "run": "round 9",
      "method": "token-endpoint and device-code requests against a lab tenant",
      "issue": "https://github.com/GrantZero604/Brambrinkmeier.com/issues/73",
      "scenario": "Refresh token after the admin revoked sessions",
      "expected": "50173 / 700082 / 50076",
      "got": "50173",
      "matchedExpectation": true,
      "message": "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 gran"
    }
  ],
  "verification": "documentation",
  "related": [
    "70043",
    "50173",
    "50133",
    "50058",
    "50089",
    "50196",
    "54005",
    "70008",
    "70044",
    "700081",
    "7000110"
  ],
  "coveredBy": [
    {
      "title": "Why is the user asked to sign in again? AADSTS70043, 700082, 50173, 50133, 50076",
      "url": "https://brambrinkmeier.com/guides/why-user-asked-to-sign-in-again-entra-id/"
    }
  ],
  "sources": [
    {
      "title": "Microsoft Entra authentication and authorization error codes",
      "url": "https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes"
    },
    {
      "title": "Non-interactive user sign-ins",
      "url": "https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-noninteractive-sign-ins"
    },
    {
      "title": "AADNonInteractiveUserSignInLogs table reference (Azure Monitor)",
      "url": "https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/aadnoninteractiveusersigninlogs"
    }
  ],
  "published": null,
  "lastUpdated": "2026-10-25",
  "lastVerified": null,
  "license": "CC BY 4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/",
  "licenseNote": "CC BY 4.0 covers the author's own text and classification fields. Quoted Microsoft error wording belongs to Microsoft, is quoted with its source and can change.",
  "attribution": "Bram Brinkmeier, \"AADSTS700082: The refresh token has expired due to inactivity\", https://brambrinkmeier.com/entra/aadsts/700082/ (CC BY 4.0)",
  "microsoftErrorLookup": "https://login.microsoftonline.com/error?code=700082"
}
