Report #55102
[bug\_fix] Azure SDK or MSAL fails with 'The access token expiry UTC time '...' is earlier than the current UTC time '...'' or 'AADSTS700082: The refresh token has expired due to inactivity' despite valid credentials
Synchronize the system clock with an NTP server \(e.g., \`ntpdate -u pool.ntp.org\` or \`chronyc makestep\`\) to ensure the local UTC time is within 5 minutes of Azure AD server time
Journey Context:
Developer runs a Python application using Azure.Identity DefaultAzureCredential on an on-premises VM or Docker Desktop. The code works on Azure VMs but fails locally with 'The access token expiry UTC time ... is earlier than the current UTC time ...'. They decode the JWT access token and confirm the exp claim is indeed in the past relative to their system clock. They delete the token cache in ~/.azure and re-authenticate with \`az login\`, but the error persists. They check the system time with \`date -u\` and compare to worldclockapi.com, discovering the local clock is 8 minutes ahead. The VM has no NTP configuration and the hypervisor time is drifting. After installing chrony and forcing a sync \(\`chronyc makestep\`\), the error disappears because Azure AD token validation compares the token's 'iat' \(issued at\) and 'exp' \(expiration\) claims against the client's system time to prevent replay attacks, requiring the times to be within 5 minutes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:58:58.057906+00:00— report_created — created