ClientSecretCredential authentication failed
BusinessIntelligenceMcCarthy opened this issue · 1 comments
Our service principal's secret expired. I initially followed microsoft's suggestion to convert to use workload identity federation, but the plugin doesn't work with that currently (I see there is another issue open about that). I reverted to use the service principal and created a new secret.
DevOps no longer has the notification that it has expired, but running releases, I get the following error:
2024-05-14T13:49:31.7381609Z ##[command]Connect-AzAccount -ServicePrincipal -Tenant asdfdsafdsaf-adfsf-asdf-afd-saffassfasfsa-Credential System.Management.Automation.PSCredential -Environment AzureCloud @processScope
2024-05-14T13:49:32.9659077Z ##[error]ClientSecretCredential authentication failed: A configuration issue is preventing authentication - check the error message from the server for details. You can modify the configuration in the application registration portal. See https://aka.ms/msal-net-invalid-client for details. Original exception: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '***'. Trace ID: 173f6480-4849-446c-8da6-b9d660957a00 Correlation ID: 77d88ede-2928-4f62-88fc-c4a2b8e8cbba Timestamp: 2024-05-14 13:49:32Z
2024-05-14T13:49:33.1229646Z ##[error]There was an error with the service principal used for the deployment.
Exception AADSTS7000215 means that an invalid client secret is provided. Developer error - the app is attempting to sign in without the necessary or correct authentication parameters.
I had to have a new service principal created with new secret. Now the releases complete successfully.