Azure DevOps AzureCLI@2 task - ERROR: AADSTS7000215: Invalid client secret provided - Stack Overflow

admin2025-05-02  3

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.

Share Improve this question asked Jan 2 at 10:42 milesbmilesb 991 silver badge11 bronze badges 0
Add a comment  | 

2 Answers 2

Reset to default 0

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.

转载请注明原文地址:http://www.anycun.com/QandA/1746124156a92008.html