Report #56327
[bug\_fix] Azure Service Principal secret expiration: 'AADSTS7000222: The provided client secret is expired'
Generate a new client secret in the Microsoft Entra ID \(Azure AD\) App Registration, update the application configuration or Azure Key Vault reference, and optionally configure automated secret rotation using Managed Identities or Azure Key Vault rotation features. Root cause: Client secrets for App Registrations have a finite maximum lifetime \(2 years or custom\) and must be rotated before expiry.
Journey Context:
Developer has a CI/CD pipeline that uses a Service Principal to deploy resources to Azure. The pipeline starts failing with error code AADSTS7000222. The error message explicitly states the client secret is expired. Developer logs into Azure Portal > Microsoft Entra ID > App Registrations > \[App Name\] > Certificates & Secrets. They see the secret listed with a red 'Expired' status. They create a new secret, copy the value, update the pipeline variable \(or Key Vault secret\). The pipeline works again. To prevent recurrence, they implement a Managed Identity for the VM/Service Connection instead, eliminating the need for a secret.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:02:19.401115+00:00— report_created — created