I have recently regenerated my service principal key used by an AzureCLI@2 task in my Azure DevOps pipeline. Following this I got the error ERROR: AADSTS7000215: Invalid client secret provided.
This is unusual because there was nothing wrong with the key and this process has worked before.
I have recently regenerated my service principal key used by an AzureCLI@2 task in my Azure DevOps pipeline. Following this I got the error ERROR: AADSTS7000215: Invalid client secret provided.
This is unusual because there was nothing wrong with the key and this process has worked before.
The workaround to this issue appears to be to create a new key with no name and a 6 month expiration period.
I did attempt to regenerate the key with different names multiple times to no avail but this did work.
I have just re-produced your issue.
And according to the Warning
in Service connection
creating in Azure Devops
I think the solution is to create a new service principal secret
and update the existing service connection
. This service principal secret
will always expire, so you will often need to update it in the service connection
configuration. To avoid this, MS recommend to use workload identity
.