The url you pass to AcquireTokenForManagedIdentity() is not valid.
ManagedIdentityApplication.AcquireTokenForManagedIdentity("api://AzureADTokenExchange") giving error in local machine.
Anonymous
Hi,
I am implementing the "Federated Identity Credential" along with User Managed identity in .net core 3.1 web api.
Getting the error code: "managed_identity_unreachable_network" with error message "A socket operation was attempted to an unreachable network." in local machine in visual studio. Please suggest the solution for the below code.
IManagedIdentityApplication mi = ManagedIdentityApplicationBuilder.Create(ManagedIdentityId.WithUserAssignedClientId(userAssignedMSI)).Build();
AuthenticationResult assertion= await mi.AcquireTokenForManagedIdentity("api://AzureADTokenExchange/.default").ExecuteAsync().ConfigureAwait(false);
Thank you,
Siva
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
Microsoft Security | Active Directory Federation Services
Microsoft Security | Active Directory Federation Services
Federated identity management using Active Directory Federation Services
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
A cloud-based identity and access management service for securing user authentication and resource access
1 answer
Sort by: Most helpful
-
Bruce (SqlWork.com) 82,606 Reputation points Volunteer Moderator
2024-05-15T15:23:07.7266667+00:00