An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
Hi @Vaddiparthi Venkata Srivatsha ,
Yes, the DefaultAzureCredential gets the token based on the environment the application is running. If you receive the "CredentialUnavailableException" it generally means that the environment variables are not configured or the tenant ID isn't being checked.
Like you said, the default credential chain starts with the EnvironmentCredential
and then moves on to the ManagedIdentityCredential . If you want to skip the EnvironmentCredential you can set ExcludeEnvironmentCredential = true as documented here:
Then you can make sure the Managed Identity environment variables are set correctly: How to use managed identities for App Service and Azure Functions
Let me know if this is what you are looking for and if you have further questions.
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar information. Otherwise let me know if you have further questions.