-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]DefaultAzureCredentials is not working #10543
Comments
@jongio Can you help? |
Did you give the SP perms to keyvault? |
Yes, I have access. One more point- i have logged in with different mail id in VS2019. But i whever if i access #ADF i use different mail id and password. So here is my uestion DefaultAzureCredentials will take it from environment system variables or .env file? |
In order to use .env values you have to load the file with DotNetEnv or similar package. DAC will use env vars, then managed identity, then VS. If you have multiple accounts then you can set the AZURE_USERNAME env var to the desired account. |
I already set the username and password in my VM system variables, but still am facing issue. |
Error desription below: service request failed. |
Please try setting the tenant id in AZURE_TENANT_ID that the keyvault is in versus the tenant Id that the SP is in. |
@jongio I have fixed the issue. azure key vault is mapped into different tenant I'd. Now am all set and verified its working as expected |
Hi Team,
I ave environment variables updated in my Azure VM and have it in .env file along with project.
if i try to access Azure key vault by using below code and keep getting invalid request.
var secretclient = new SecretClient(
new Uri("keyvaulturl"),
new DefaultAzureCredentials()
};
var clientid = await secretclient.GetSecretAsync("someid); //here am keep getting unauthorized- 401 error.
Please let me know, what i am doing wrong.
Thanks
The text was updated successfully, but these errors were encountered: