Report #71785
[bug\_fix] InvalidAuthenticationToken: Token has expired or is not valid
Run \`az login\` to refresh the authentication token, or if using a service principal, run \`az login --service-principal\` with the current credentials. Azure CLI caches access tokens in ~/.azure; when the token expires \(typically after 1 hour for access tokens, or when refresh tokens are invalidated by password changes or Conditional Access policies\), explicit re-authentication is required to obtain a new token pair.
Journey Context:
Developer returns to work after the weekend, runs \`az storage blob list\` and gets 'InvalidAuthenticationToken: The token has expired'. Tries \`az account list\` which shows the correct subscription, confusing them because they think 'logged in' means 'valid token'. Tries \`az account set --subscription\` to switch context, still fails with same error. Realizes that \`az account\` commands use the profile cache \(subscription list\) while data-plane commands require a valid access token. Runs \`az login\`, goes through browser auth flow, token is refreshed, and storage commands work. Root cause was the access token expiry time \(default 3600 seconds\) had passed and the refresh token was either expired or rejected due to recent password change.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:04:40.591110+00:00— report_created — created