Report #77823
[bug\_fix] AADSTS700082: The refresh token has expired due to inactivity. The token was issued on \[date\] and was inactive for 90 days.
Execute 'az login' interactively to obtain a new refresh token, or migrate the workload to Managed Identity or Service Principal with client certificate \(which does not use refresh tokens subject to 90-day inactivity\). Root cause: Azure AD refresh tokens obtained via interactive user login are valid for 90 days of inactivity \(or less if configured by admin\). If the application does not redeem the refresh token to get a new access token within that window, the refresh token is purged from Azure AD's token store.
Journey Context:
A DevOps engineer has a monthly compliance audit script that runs locally on their laptop using Azure CLI \('az account get-access-token'\) to scan Azure resources. It works for months, then suddenly throws 'AADSTS700082'. They check the tenant status, it's fine. They realize the refresh token in the local cache \('~/.azure/msal\_token\_cache.json'\) hasn't been refreshed because the script only runs monthly, and the 90-day inactivity window passed since the last interactive login. Running 'az login' fixes it. To prevent recurrence, they refactor the script to use a Service Principal with a client secret stored in Azure Key Vault, eliminating the interactive refresh token lifecycle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:13:42.655335+00:00— report_created — created