Skip to content

Question: Does ManagedIdentityCredential read from env var? #2578

@seesharprun

Description

@seesharprun

In Azure identity libraries from other languages, you can set the AZURE_CLIENT_ID environment variable and the ManagedIdentityCredential class will automatically read that from the environment variable if it's set. You always have the option to override that manually.

It's a technique I use with the .NET/JS/Go/Python/Java Azure SDKs to automatically set the clientId for a user-assigned managed identity with a host like Azure App Service.

Is that implemented in this library? I tried to search for the implementation, but I could only find logic to read from the environment variable with WorkloadIdentityCredential.

https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/identity/azure_identity/src/credentials/workload_identity_credentials.rs#L73-L78

Metadata

Metadata

Assignees

Labels

Azure.IdentityThe azure_identity cratecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions