Report #22278
[bug\_fix] AADSTS7000215: Invalid client secret is provided.
Navigate to Microsoft Entra admin center > Identity > App registrations > \[Your App\] > Certificates & secrets, create a new client secret \(noting the expiration date\), and update the AZURE\_CLIENT\_SECRET environment variable \(or secret store\) with the new value. To prevent recurrence, configure the secret with a calendar reminder before expiration, implement automated rotation using Azure Key Vault with a rotation policy and the Azure Event Grid notification, or migrate the application to use Managed Identity \(System-assigned or User-assigned\) which eliminates client secrets entirely and uses Azure AD managed tokens.
Journey Context:
A DevOps team deploys a Node.js microservice to Azure Kubernetes Service \(AKS\) that connects to Azure Storage using the @azure/identity DefaultAzureCredential with environment variables AZURE\_CLIENT\_ID, AZURE\_TENANT\_ID, and AZURE\_CLIENT\_SECRET configured via Kubernetes secrets. The application runs successfully for exactly one year. Suddenly, on the anniversary of the deployment, all pods begin crash-looping with the error "AADSTS7000215: Invalid client secret is provided." The team checks the Kubernetes secret—it matches what was provisioned originally. They check Azure AD App registrations and navigate to Certificates & secrets. They discover that the client secret shows a red "Expired" badge with a date from one year ago \(the default expiration when created through the portal\). The secret was never rotated. They create a new secret, copy the value, update the Kubernetes secret, and restart the pods. The application recovers. To prevent this from happening again, they refactor the application to use Azure Workload Identity \(federated identity credentials\) for AKS, allowing the pod to authenticate as the managed identity without any client secret, eliminating the expiration issue entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:48:06.773313+00:00— report_created — created