CredentialUnavailableException: ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint.

SohamPrasad Girde (Wipro Designit Services, Inc.) 40 Reputation points Microsoft Vendor
2024-10-16T09:42:37.2333333+00:00

Hi ,

     I am trying to remove the key vault and secrete from my web app and integrating managed identity but while running it locally i'm getting an error below -   

CredentialUnavailableException: ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint.

I believe while running locally it takes default credentials and when deploy it takes MI credentials .

Thank you for your time and looking forward for solutions.

Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
151 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,961 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Akhilesh Vallamkonda 10,325 Reputation points Microsoft Vendor
    2024-10-21T20:15:54.87+00:00

    Hi @SohamPrasad Girde (Wipro Designit Services, Inc.)

    Thank you for post!

    I understand that you are trying to remove the key vault and secrete from my web app and integrating managed identity while running it locally you are getting an error below.*CredentialUnavailableException: ManagedIdentityCredential authentication unavailable. Multiple attempts failed to obtain a token from the managed identity endpoint.
    *
    The error message indicates that the Managed Identity authentication is not working. you need to ensure that the Managed Identity is enabled for your application and that the necessary permissions are granted to the Managed Identity.
    please follow Clean up resources which you don't want to continue using the resources.
    Also please follow Remove an identity System-assigned identities are also automatically removed from Microsoft Entra ID when you delete the app resource itself.

    Reference: https://learn.microsoft.com/en-us/azure/azure-app-configuration/howto-integrate-azure-managed-service-identity?pivots=framework-dotnet

    Hope this helps. Do let us know if you any further queries by responding in the comments section.

    Thanks,

    Akhilesh.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.