My Project is using a nuget which implementing auth token validation using DefaultAzureCredential()
based SecretClient creation for reading azure keyvault.
Due to DefaultAzureCredential follows following order for auth, my code gives mangedIdentity expection
while running code in visualStudio.
What shall be done to enable local debugging of code smoothly, can we change this order or can we change the code for debug mode in external nuget?
EnvironmentCredential
WorkloadIdentityCredential
ManagedIdentityCredential
AzureDeveloperCliCredential
SharedTokenCacheCredential
VisualStudioCredential
VisualStudioCodeCredential
AzureCliCredential
AzurePowerShellCredential
InteractiveBrowserCredential
https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet
Exception details: (comes while debugging on local) Message:
Azure.Identity.AuthenticationFailedException : ManagedIdentityCredential authentication failed: Method not found: '!0 Microsoft.Identity.Client.AbstractApplicationBuilder`1.WithInstanceDiscovery(Boolean)'.
See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot
---- System.MissingMethodException : Method not found: '!0 Microsoft.Identity.Client.AbstractApplicationBuilder`1.WithInstanceDiscovery(Boolean)'.