Skip to content

[QUERY] workload identity through Azure ADO pipeline service connection #46622

Open

Description

Library name and version

azure.identity 1.11.4

Query/Question

Hello,

we are using AzureCLI2 ADO task and pass in a service connection through azureSubscription parameter.

In this AzureCLI2 task, we are using dotnet test command for unit testing.

In our C# unit tests, we are using DefaultAzureCredential.

We tried
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { WorkloadIdentityClientId = "xxx", TenantId = "xxx"});

or

var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = "xxx" });

But neither seems working. What is the correct way to use workload identity in C# code?

Thanks

Environment

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions