Report #92907
[bug\_fix] AADSTS700082: The refresh token has expired due to inactivity
Execute \`az login\` \(Azure CLI\) or \`Connect-AzAccount\` \(PowerShell\) to perform an interactive authentication flow and obtain a new refresh token. Azure AD refresh tokens for public client applications \(like the Azure CLI\) have a default lifetime of 90 days of inactivity. The new refresh token will be stored in the MSAL token cache \(~/.azure/msal\_token\_cache.json on Linux/macOS or %USERPROFILE%\\.azure\\msal\_token\_cache.json on Windows\) and will be valid for another 90 days of use.
Journey Context:
A DevOps engineer has a weekly cron job on their workstation that runs \`az storage blob sync\` to backup local data to Azure Blob Storage using their user credentials. The script worked perfectly for months. After a three-month vacation, they return and the cron job fails with 'AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2023-01-01 and was inactive for 95 days.' The engineer runs \`az account show\` and sees the subscription information, but any API call like \`az group list\` fails with the same error. They check the Azure Portal and can log in via browser fine. They search for AADSTS700082 and learn that refresh tokens expire after 90 days of inactivity for security reasons. They run \`az login\`, complete the browser-based authentication, and the cron job works again. The new refresh token is written to the MSAL cache.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:31:56.386918+00:00— report_created — created