Questions tagged [defaultazurecredential]

The DefaultAzureCredential class enables to connect and retrieve tokens from Azure Active Directory

The DefaultAzureCredential class enables to connect and retrieve tokens from Azure Active Directory.
There are implementations for:

39 questions
7
votes
5 answers

How do I keep/store my azure credentials?

I have this web app which access a keyvault stored in Azure cloud. To access this KeyVault I use the IConfigurationBuilder Extension configuration.AddAzureKeyVault(new Uri(KeyvaultUri), new DefaultAzureCredential(true)); I have created an managed…
I am not Fat
  • 283
  • 11
  • 36
7
votes
1 answer

How to Unit test DefaultAzureCredential Method

I am getting the access token using the default azure credentials method while using the managed identity of the function app to get the access token.I am able to get the token. but now I am not sure how I will unit test that method. Here is the…
6
votes
1 answer

How to use DefaultAzureCredential in both local and hosted Environment (Azure and On-Premise) to access Azure Key Vault?

We have a web api(.NET 5) which access some secrets from the Azure KeyVault. In local machine for development, since I am the owner the new vault created, my email has access privilege to keyvault. Hence I selected my account though VS -->Tools>…
5
votes
2 answers

Docker container app service in azure. How to use DefaultAzureCredential for keyvault

I have a container app service running in azure and it works fine. However if i want to run this container locally it fails because it cant authenticate to read the key vault in azure. .ConfigureAppConfiguration((context, config) => { var…
CathalMF
  • 9,705
  • 6
  • 70
  • 106
4
votes
0 answers

DefaultAzureCredential error on macOS Big Sur (M1 chip)

Currently, we are migrating our Azure resources to communicate via Azure System Managed Identity. I encountered an issue using DefaultAzureCredential on my MacOS with M1 chip. As I understand Visual Studio for Mac is not supporting…
3
votes
1 answer

What is the difference between connection string and StorageCredentials for accessing Azure Blob Storage?

I'm looking into using Azure Blob Storage and, from looking at several tutorials, I get that one can access the blob storage through a connection string or using StorageCredentials. Is there a best practice? Or do both serve a different…
1
vote
1 answer

Azure managed identity accessing from different account

I have created an user-assigned identity using account A@hotmail.com and copied the clientid. After this I have assigned a role to this identity on a particular storage account. Also I have added this user-assigned identity to an azure function. Now…
1
vote
0 answers

Using DefaultAzureCredential with Ubuntu + Rider

I am attempting to run a .NET 6.0 project locally on my Ubuntu machine using rider. The project using the DefaultAzureCredential class but when I trying running it gives the following error "DefaultAzureCredential failed to retrieve a token from…
1
vote
3 answers

AADSTS50020: User account '{EmailHidden}' from identity provider does not exist in tenant 'Microsoft Services' and cannot access the application

Using Azure.Identity Running dotnet 6.0.302 On Windows 10 Visual Studio 2022 v17.1.5 App Type - Asp.Net Core Web Api I am trying to implement Azure App Configuration. While using DefaultCredentials() the attempt to obtain an authentication token…
1
vote
1 answer

Access Azure Key Vault with Managed Identity on Azure Batch running .NET Console Application

Is it possible to access Azure Key Vault Secrets with Azure Managed Identity setup on the Azure Batch? I've read through Microsoft docs and the only option I technically see is using certificate based authentication to access key vault within the…
1
vote
0 answers

Connecting EventHubConsumerClient to Azure IoTHub does not work with managed identity

I am trying to consume IoTHub messages with EventHubConsumerClient in python. (I also tried the csharp EventProcessorClient, it seems to have the same problem) I am running the EventHubConsumerClient in a VM. The setup: IoT Hub accessible from the…
1
vote
1 answer

Api-version must be specified when using azure keyvault SecretClient .net sdk

I am trying to set a secret in azure keyvault using managed identity. There are two problems which I am facing right now. Hope someone can help me with it. Code: var client = new SecretClient(new Uri("keyvaulturl"), new…
1
vote
1 answer

I can't write text in form of hyperlink in azure bot default answer, the bot is working in MS teams but it displays only text

The bot is created with QnA maker and integrated with Microsoft teams. The knowledge base has many questions and answer pairs but the default answer only accepts text when editing it in azure portal here:…
1
vote
1 answer

DefaultAzureCredential: Graph access forbidden with VisualStudio Code Credential

I'm trying to read user properties from ms graph inside an Azure function. For authentication I used the DefaultAzureCredential class from Azure.Identity. Access with Shared Token Cache Credential locally and Managed Identity Credential in Azure is…
1
vote
1 answer

How to retrieve Secret from Azure Key Vault using DefaultAzureCredential

I have setup my keyVault in Azure, and add the secret there. I am now following instructions from Microsoft located here. My current code looks like below: var keyVaultName = Environment.GetEnvironmentVariable("KEY_VAULT_NAME"); …
pnizzle
  • 6,243
  • 4
  • 52
  • 81
1
2 3