Skip to content

[BUG] ChainedTokenCredential throws an exception when VisualStudioCodeCredential is present  #14408

Closed

Description

Describe the bug
When the VisualStudioCodeCredential is present, the ChainedTokenCredential throws an exception when running in production (Azure), i.e outside the local dev environment.

Expected behavior
Rather than iterate through the defined TokenCredential options, the code throws an exception as soon as it encounters the VisualStudioCodeCredentials which fails to retrieve the credential since it's not present outside the dev environment

Actual behavior (include Exception or Stack Trace)
The code throws an exception:

Error: Azure.Identity.AuthenticationFailedException: The ChainedTokenCredential failed due 
to an unhandled exception: VisualStudioCodeCredential authentication failed: The operation 
completed successfully.

To Reproduce
Create an application that uses Azure.Identity and Azure Blob Storage SDKs and deploy this code to Azure

  1. Add VisualStudioCodeCredential to the ChainedTokenCredential options
  2. Deploy the code to Azure WebApps
  3. Exception happens during authenticaiton

Environment:

  • Azure.Identity 1.2.1
  • Azure Web Apps running on Windows, .NET Core 3.1
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-team-attentionWorkflow: 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 that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions