-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Library name and version
Azure.Identity 1.12.0
Describe the bug
Recentrly our application started to fail with exception:
Exception caught: Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/defaultazurecredential/troubleshoot
information. https://aka.ms/azsdk/net/identity/workloadidentitycredential/troubleshoot
- ManagedIdentityCredential authentication unavailable. No response received from the managed identity endpoint.
We tried increasing timeout and configuring retry option, but that didn't help:
SecretClientOptions opt = new SecretClientOptions();
opt.Retry.NetworkTimeout = TimeSpan.FromSeconds(30);
When debugging through the code I noticed that timeout is ignored and hard-coded value of 1 second is used
I also noticed that no retries are performed by SecretClient itself (log attached).
We will be implementing our own retry mechanism on top but really what we need is ability to configure retries and timeouts properly.
Expected behavior
Retry.NetworkTimeout should be used as actual timeout value
Actual behavior
hard-coded value of 1 sec is used and error message recommends configuring it via ClientOptions.Retry.NetworkTimeout which is not honored.
Reproduction Steps
SecretClientOptions opt = new SecretClientOptions();
opt.Retry.NetworkTimeout = TimeSpan.FromSeconds(30);
var client = new SecretClient(keyVaultUri, credentials, opt);
client.GetSecret("secretname");
Environment
Windows Server 2025 DataCenter, .net framework 4.8
Metadata
Metadata
Assignees
Labels
Type
Projects
Status