Report #47083
[bug\_fix] Azure AD client secret expired - 'AADSTS7000222: The provided client secret keys are expired'
Create a new client secret in the Azure Portal under App registrations > Certificates & secrets, copy the new secret value, and update the application's configuration \(environment variable, Azure Key Vault, or configuration file\). This works because Azure AD requires client secrets for confidential client OAuth2 flows; these secrets have mandatory expiration dates \(max 2 years\) and must be rotated before expiration to maintain authentication capability.
Journey Context:
A production microservice suddenly starts returning 401 Unauthorized with error code AADSTS7000222 in the logs. The developer checks the Azure Portal > Entra ID > App registrations > their-app > Certificates & secrets. They see the active secret 'my-service-secret' shows status 'Expired' with an expiration date of yesterday. They realize the DevOps pipeline deploys the secret from Azure Key Vault, but the Key Vault secret was not updated because the client secret rotation was missed. They click 'New client secret', set expiration to 24 months, copy the value immediately \(as it won't be shown again\), and update the Key Vault secret. They restart the microservice, which now successfully obtains an access token from Azure AD. The fix works because the new secret is valid and accepted by the token endpoint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:30:09.003682+00:00— report_created — created