DefaultAzureCredential can be used in Azure DevOps pipelines through the AzureCLI@2 task, enabling consistent authentication between local development and CI/CD environments. The credential chain supports both AzureCliCredential (using service connections) and EnvironmentCredential (using environment variables), allowing developers to authenticate against Azure resources without changing their code between local and pipeline execution.

4m read timeFrom johnnyreilly.com
Post cover image
Table of contents
What is DefaultAzureCredential ? ​Why have you told me about EnvironmentCredential and AzureCliCredential ? ​Using the AzureCLI@2 task with AzureCliCredential ​Using the AzureCLI@2 task with EnvironmentCredential ​Conclusion ​

Sort: