AzureCliCredential interrupts credential chain if Azure CLI is not logged in #11819
Labels
Azure.Identity
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Milestone
Describe the bug
On Windows (haven't tried other OSes, but would expect the same), if the Azure CLI client is logged out, then the
AzureCliCredential
class will raiseClientAuthenticationError
, which causes the credential chain to stop. A common need is to includeInteractiveBrowserCredential
as the final link in a chained credential, and this bug prevents it from being used.To Reproduce
Steps to reproduce the behavior:
credential
for some purpose that would cause it to retrieve a token.Expected behavior
I believe if the
AzureCliCredential
class were to raiseCredentialUnavailableError
instead, then the chain would continue.Additional context
Found in the course of attempting to work around Azure/azure-sdk-for-net#8934.
The text was updated successfully, but these errors were encountered: