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
Intermittent Exceptions when calling DefaultAzureCredential #15013
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
The response time for providing a fix for this issue is great. Well done to the team who picked it up. |
Yes, thank you for the quick turnaround. This morning we had a different error, but looks to be similar root cause:
|
@thecodetinker Thanks again for filing this issue and the information provided. This issue should be fixed in Azure.Identity 1.2.3 released today. If you find that you are still encountering this issue after upgrading to 1.2.3 please reopen the issue. |
We've done some runs with the new code and so far, so good. Thanks for turning this around so quickly, much appreciated! |
Describe the bug
Since moving to the latest Azure Identity libraries we have been plagued with intermittent Exceptions when calling
DefaultAzureCredential.GetTokenAsync
. The code works fine 99% of the time, but sometimes we get one of the following two Exceptions. The code also then hangs soon afterwards - we haven't any hard evidence to implicate Azure Identity in this but we have suspicions.Expected behavior
The code should reliably obtain a credential token from Azure. The code should be thread-safe.
Actual behavior (include Exception or Stack Trace)
The call usually works, but occasionally it throws an Exception with one of the following stack traces. Either Collection was modified:
Or NullReferenceException:
To Reproduce
This is the code used to call
GetSecretAsync
, nothing fancy. It is called from a multi-threaded environment although the result is cached elsewhere to avoid quota / throttling issues on the KeyVault itself.Environment:
The text was updated successfully, but these errors were encountered: