pulumi / pulumi-az-pipelines-task

Azure Pipelines task extension for running Pulumi apps.
https://marketplace.visualstudio.com/publishers/pulumi
Apache License 2.0
27 stars 19 forks source link

Authentication Failed when using Service Connection / Security Principal #152

Closed MartinHatchUK closed 4 months ago

MartinHatchUK commented 4 months ago

I'm using a Service Connection which authenticates to Azure using a Service Principal. This has been fully tested both locally in my own command line as well as in the DevOps pipeline using the Azure CLI - so just wanted to rule out the credentials and/or service connection being the issue.

When I run a pulumi command I end up repeatedly getting an error message:

error: getting stack configuration: get stack secrets manager: secrets (code=Unknown): DefaultAzureCredential authentication failed

"unathoriszed client" "Application with identifier *** was not found in the Directory ..."

image

The "PULUMI_ACCESS_TOKEN" clearly worked without any issues - so I'm not really sure what the problem is here?

MartinHatchUK commented 4 months ago

It seems I had some other variables such as AZURE_CLIENT_ID which were interfering with the Service Connection