Closed jonnybee closed 3 days ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @jonnybee - I'm unable to reproduce this behavior. It fails immediately for me and takes the expected multiple of 5 seconds when a non-zero retry count is specified. What you are encountering is the network timeout for the first attempt to the local endpoint which is being responded to by some service or proxy in your local environment.
You can change the network timeout via the options like this:
options.Retry.NetworkTimeout = TimeSpan.FromSeconds(5);
Library name and version
Azure.Identity v1.13.x
Describe the bug
Since v1.13.0 release the GetTokenAsync method does not honor RetryPolicy correct.
This bug is related to suggested fix in 47156
Expected behavior
The GetTokenAsync method should throw an Exception within 5 seconds when configured with MaxRetries = 0 and DelayStrategy = 5 seconds and no Token is available as it did in v1.12.1 and older versions.
Actual behavior
In v1.13.1 the same code will now throw AuthenticationFailedException after 21 seconds when token is not available.
Reproduction Steps
Environment
.NET SDK: Version: 9.0.100 Commit: 59db016f11 Workload version: 9.0.100-manifests.c6f19616 MSBuild version: 17.12.7+5b8665660
Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\9.0.100\