Related command
az login
Is your feature request related to a problem? Please describe.
Currently if using workload identity and azure cli, az login must be specifically configured for login
Describe the solution you'd like
similar to az login --identity, maybe something like az login --workflow-identity
Describe alternatives you've considered
You can work around it currently using
az login --federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)" --service-principal -u $AZURE_CLIENT_ID -t $AZURE_TENANT_ID
Additional context
For the client libraries a specific class is available WorkloadIdentityCredential
More generally it would be nice if az login had a way to use something similar to DefaultAzureCredential which would allow scripts to be more portable depending on execution context
Related command
az login
Is your feature request related to a problem? Please describe.
Currently if using workload identity and azure cli, az login must be specifically configured for login
Describe the solution you'd like
similar to az login --identity, maybe something like az login --workflow-identity
Describe alternatives you've considered
You can work around it currently using
az login --federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)" --service-principal -u $AZURE_CLIENT_ID -t $AZURE_TENANT_ID
Additional context
For the client libraries a specific class is available
WorkloadIdentityCredentialMore generally it would be nice if az login had a way to use something similar to
DefaultAzureCredentialwhich would allow scripts to be more portable depending on execution context