-
Notifications
You must be signed in to change notification settings - Fork 3.3k
AzureCliCredential does not work as intended when using a Chinese version of Windows #27965
Copy link
Copy link
Closed
Labels
Azure.IdentityClientThis issue points to a problem in the data-plane of the library.This 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.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
Azure.IdentityClientThis issue points to a problem in the data-plane of the library.This 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.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
AzureCliCredentialreturns anClientAuthenticationErrorwhenazure cliis not installed, on a Chinese windows installation.The correct error to return is a
CredentialUnavailableError, which is returned if using English language version of Windows. Returning the wrong error, makes it not possible to useAzureCliCredentialin aChainedTokenCredentialchain.I belive this bug is because AzureCliCredential is hardcoded to look for the English text:
ex.stderr.startswith("'az' is not recognized")
To Reproduce
Steps to reproduce the behavior:
azure cliinstalledExpected behavior
I expect the
CredentialUnavailableErrorto be returned, notClientAuthenticationError.Screenshots