-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] DefaultAzureCredential throws exception when ManagedIdentityCredential failed #45808
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Hi @Yao725 - Would you mind providing the logging output (with any secrets redacted) after reproducing this with logging enabled? |
Hi @Yao725. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @Yao725, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Hi We're also seeing this issue when code is running in a GitHub Actions pipeline running integration tests that rely on a WebApplicationFactory instance. We're seeing it with version |
I'm also seeing this issue in a GitHub Codespace. It will stop trying further credentials after ManagedIdentity, even if I'm logged in to Azure CLI or Azure Developer CLI. This is definitely a regression in previous working behavior. If I wasn't logged in, I would expect an error from DefaultAzureCredential that it exhausted all options and can't find an identity (I've seen this error before). But, in the GitHub Codespaces environment using the .NET 9 devcontainer base image, it short circuits and errors out at ManagedIdentityCredential and never tries any downstream options in the token chain. Repro steps:
Alternatives:
Temporary workarounds:
|
Hi @seesharprun - would you be willing to validate that this version dev build from our public dev NuGet feed of Azure.Identity resolves the |
@christothes, here's what I just tried:
I'll try again tomorrow. |
I believe this is now fixed with #46787 |
I just tested everything again. Here's my results:
Thanks @christothes for the assist! I'll wait for |
Library name and version
Azure.Identity 1.13.0-beta.1
Describe the bug
When upgrading the package from 1.12.0 to 1.13.0-beta.1, if DefaultAzureCredential is used and the ManagedIdentityCredential failed, the exception will be directly thrown instead of trying using next credential type.
Expected behavior
This exception can be well handled and the auth should finally succeed just like Azure.Identity 1.12.0.
Actual behavior
Below exception is thrown.
Reproduction Steps
Use Azure.Identity 1.13.0-beta.1 and DefaultAzureCredential
Sample code:
Environment
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
The text was updated successfully, but these errors were encountered: