what authentication are you using to access the keyvault?
connection string
client secret
msal
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to access the Azure secret via a C# console application. It works when I am in the debug mode as I registered myself in the Azure policy. However, if I just run the "exe", I receive the following error. What should I register in order to let the machine or console app to run?
Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials
Thanks in advance!
what authentication are you using to access the keyvault?
connection string
client secret
msal
Hello @Wanda ,
I was able to check through this and found that this is a known error while retrieving secret from key vault as per ref: https://techcommunity.microsoft.com/t5/iis-support-blog/defaultazurecredential-failed-to-retrieve-a-token/ba-p/3038734. Kindly follow the given actions :
In order to solve this issue in a local machine:
Thanks,
Akshay Kaushik
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
Hi Akshay,
The challenge is I have AZURE_CLIENT_ID, AZURE_CLIENT_SECRET all in the Azure Key Vault since I want to save these variables in a secure way instead of having them in the environment variables. How safe is it to have the AZURE_CLIENT_SECRET in the environment variables? I initially have them all in the machine.config and decide to move them to Azure Key Vault.
Please advise.