Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | AADSTS700082: Refresh token has expired due to inactivity. | Azure AD sign-in logs | -> Indicates token validity window exceeded. |
| OS build range | Windows 11 23H2 (OS Build 22621.1000+) | System Information tool | -> Affects recent Windows 11 updates. |
| Registry key involved | HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System | Windows Registry Editor | -> Contains token cache settings. |
| Relevant service/endpoint URL | https://login.microsoftonline.com/ | Network logs | -> Token revocation endpoint. |
| Log line signature | Microsoft.Identity.Client - AADSTS700082 | Event Viewer logs | -> Appears in authentication failure logs. |
Log Files to Check
C:\Windows\System32\LogFiles\WMI\Security\*%localappdata%\Microsoft\EntraID*.log
What This Error Actually Means
The errorAADSTS700082 is raised by the Microsoft Entra ID (formerly Azure AD) authentication service when a refresh token has expired due to inactivity or policy enforcement. This error is part of the AADSTS (Azure AD Status) error family, where the numeric suffix 700082 specifically indicates token expiration caused by either exceeding the token validity window or revocation via Conditional Access (CA) policy changes. The component responsible for this error is the Microsoft Entra ID token validation engine, which enforces security policies around token lifetimes and access conditions.
Refresh tokens are long-lived credentials used to obtain new access tokens without reauthenticating. When a refresh token expires due to inactivity (e.g., no sign-in activity for the configured token lifetime), the user must reauthenticate. Additionally, if a Conditional Access policy is updated to invalidate existing tokens (e.g., requiring MFA for a resource), the token may be revoked immediately, triggering this error. This is distinct from access token expiration, which is expected behavior and does not require reauthentication unless the refresh token is also invalid.
Affected Versions and Scope
This error occurs in Windows 11 23H2 (OS Build 22621.1000+) and later builds. It is not limited to a specific version of Entra ID but is more prevalent in tenants with strict Conditional Access policies or extended token lifetimes. Tenants using legacy authentication protocols (e.g., OAuth 1.0) or those without CA policies enabled are less likely to encounter this error. The scope includes devices enrolled in Entra ID with hybrid or cloud-only identities, particularly those using modern authentication (MSAL) for applications. Devices running older OS versions (e.g., Windows 10 21H2 or earlier) are not affected due to differences in token caching and CA policy enforcement. Additionally, devices configured with device-based Conditional Access (e.g., requiring device compliance) may trigger this error if the device’s compliance state changes after token issuance.Where To Look First: Logs and Event IDs
To diagnose this error, start with the following logs and Event IDs: 1. **Event Viewer Logs**: - Navigate toApplications and Services Logs > Microsoft > Identity > Client > Microsoft.Identity.Client.
- Look for Event ID 6000 (token acquisition failure) with the error string AADSTS700082.
2. **Windows Security Logs**:
- Check Event ID 4625 (failed login) for correlation with token expiration.
- Use Get-WinEvent -LogName "Security" | Where-Object { $_.Message -match "AADSTS700082" } to filter logs.
3. **Entra ID Log Files**:
- Inspect C:\Windows\System32\LogFiles\WMI\Security\* for WMI-based authentication events.
- Review %localappdata%\Microsoft\EntraID*.log for client-side token caching errors.
4. **Network Logs**:
- Confirm requests to https://login.microsoftonline.com/ in Microsoft-NetTrace-*.etl files using tools like Microsoft Message Analyzer.
Root Causes
1. Token Validity Window Exceeded
This occurs when a refresh token remains unused for longer than the configured token lifetime. The default validity window for refresh tokens is 90 days, but this can be adjusted in Conditional Access policies. To differentiate this cause, check the last sign-in timestamp in the Entra ID sign-in logs (auditLogs/signIns).
2. Conditional Access Policy Revocation
A CA policy update (e.g., adding MFA requirements or device compliance rules) can invalidate existing refresh tokens. This is logged in the Entra ID audit logs underConditional Access events. Use Get-MgAuditLogSignIn -Filter "status/errorCode eq 700082" to identify policy-triggered revocations.
3. Misconfigured Token Lifetime Policies
Custom token lifetime policies that override default values can inadvertently shorten refresh token validity. Verify policies inEntra admin center > Security > Conditional Access > Token lifetime policies.
Fix Procedure
- **Adjust Token Lifetime Policy**:
Update-MgPolicyTokenLifetimePolicy -Id "default" -Description "Extended refresh token validity" -TokenType "refreshToken" -LifetimeInMinutes 1440Navigate toEntra admin center > Security > Conditional Access > Token lifetime policiesto configure via the portal. - **Modify Registry for Token Caching**:
Set
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTokenCachingto0to enable aggressive token refresh. - **Enforce Device Compliance via Intune**:
Update-MgDeviceManagementDeviceCompliancePolicy -Id "device-compliance-policy-id" -Description "Enforce CA policy" -PasswordRequired $trueUseIntune admin center > Devices > Compliance policiesto align with CA requirements. - **OMA-URI for Device Policy Enforcement**:
./Device/Vendor/MSFT/Policy/Config/DeviceCompliance/PasswordRequired
Modifying
DisableTokenCaching in the registry may force frequent reauthentication, disrupting user workflows. Test in a non-production environment first.
Error Code Variants
| Error Code | Description | Distinguishing Factor |
|---|---|---|
AADSTS700082 |
Refresh token expired due to inactivity or CA revocation | Linked to Conditional Access policy changes or token lifetime policies |
AADSTS50057 |
Token expired or revoked | General token expiration without CA policy context |
AADSTS50058 |
Token revoked due to user sign-out | Triggered by explicit user sign-out or account deactivation |
Verification
After applying fixes, verify resolution by: 1. CheckingEvent Viewer for absence of AADSTS700082 in Microsoft.Identity.Client logs.
2. Using Get-MgAuditLogSignIn -Filter "status/errorCode eq 0" to confirm successful sign-ins.
3. Running dsregcmd /status to validate device registration state.
Prevention
To prevent recurrence: - Align token lifetime policies with organizational SLAs inEntra admin center > Security > Conditional Access.
- Implement Intune device compliance policies that enforce CA requirements via:
Set-MgDeviceManagementDeviceCompliancePolicy -Id "policy-id" -PasswordRequired $true
- Monitor CA policy changes in Entra admin center > Security > Conditional Access > Policies and test token revocation scenarios.
Use
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" to quickly identify token caching issues without parsing raw logs.