-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Azure.IdentityClientThis issue is related to a non-management packageThis issue is related to a non-management packageneeds-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.
Description
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.
System.AggregateException: One or more errors occurred. ---> Azure.Identity.AuthenticationFailedException: ManagedIdentityCredential authentication failed: [Managed Identity] Authentication unavailable. Either the requested identity has not been assigned to this resource, or other errors could be present. Ensure the identity is correctly assigned and check the inner exception for more details. For more information, visit https://aka.ms/msal-managed-identity.
Status: BadRequest
Content:
{"error":"invalid_request","error_description":"Identity not found"}
Headers:
Date: Thu, 05 Sep 2024 04:25:15 GMT
Server: IMDS/150.870.65.1391
[Managed Identity] Error Code: invalid_request Error Description: Identity not found
See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot ---> Microsoft.Identity.Client.MsalServiceException: [Managed Identity] Authentication unavailable. Either the requested identity has not been assigned to this resource, or other errors could be present. Ensure the identity is correctly assigned and check the inner exception for more details. For more information, visit https://aka.ms/msal-managed-identity.
Status: BadRequest
Content:
{"error":"invalid_request","error_description":"Identity not found"}
Headers:
Date: Thu, 05 Sep 2024 04:25:15 GMT
Server: IMDS/150.870.65.1391
[Managed Identity] Error Code: invalid_request Error Description: Identity not found
Reproduction Steps
Use Azure.Identity 1.13.0-beta.1 and DefaultAzureCredential
Sample code:
var credential = new DefaultAzureCredential();
var secretClient = new SecretClient(new Uri(keyVaultUri), credential);Environment
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
Metadata
Metadata
Assignees
Labels
Azure.IdentityClientThis issue is related to a non-management packageThis issue is related to a non-management packageneeds-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.
Type
Projects
Status
Done