Report #17192
[bug\_fix] AADSTS7000222: The provided client secret keys are expired.
Rotate the client secret in the Microsoft Entra ID \(Azure AD\) App Registration. Navigate to App registrations > \[Your App\] > Certificates & secrets, create a new client secret, copy the 'Value' \(not the Secret ID\), and update the environment variable \(e.g., AZURE\_CLIENT\_SECRET\) or Key Vault secret that the application consumes. The root cause is that Entra ID client secrets have a mandatory expiration \(max 2 years\), and the DefaultAzureCredential or EnvironmentCredential in the Azure SDK reads the expired value.
Journey Context:
A production service running on Azure Kubernetes Service uses a service principal to access Azure Key Vault. On a Tuesday morning, the pods start crash-looping with 'AADSTS7000222'. The developer checks the Key Vault access policies and they look fine. They check the Kubernetes secret containing the client secret and realize it was created exactly 2 years ago to the day. They log into the Azure Portal, go to the App Registration for the service principal, and see a red 'Expired' badge next to the client secret. They generate a new secret, base64 encode it, update the Kubernetes secret, restart the deployment, and the pods recover.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:45:41.333985+00:00— report_created — created