Report #61380
[bug\_fix] AADSTS80013: The time in the token is outside the valid time range \(Azure AD\)
Synchronize the system clock of the host to UTC using NTP \(e.g., \`sudo ntpdate -u time.windows.com\` or enabling \`systemd-timesyncd\`\). Ensure the VM's time is within 5 minutes of the official time. If running in a container, ensure the container shares the host's time namespace or runs an NTP client.
Journey Context:
Developer runs a .NET microservice on an on-premises Kubernetes cluster that authenticates to Azure Key Vault using a service principal. One morning, the service starts throwing 'AADSTS80013: The time in the token is outside the valid time range' or 'InvalidAuthenticationToken'. Developer captures the JWT access token and decodes it; the iat \(issued at\) and exp \(expiration\) timestamps appear correct relative to their local machine time. They regenerate the client secret, check the tenant ID, and verify network connectivity to login.microsoftonline.com. They even try upgrading the Azure.Identity SDK. After checking the Event Viewer on the Windows node \(or logs on Linux\), they notice the system clock is 7 minutes behind UTC. Azure AD rejects tokens issued from the future or past beyond a 5-minute skew tolerance to prevent replay attacks. The NTP service on the node had stopped. Restarting the NTP service and forcing a sync immediately resolves the authentication error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:30:47.607323+00:00— report_created — created