parth patel
parth patel

Reputation: 15

Can we get secret value from azure without using client secret?

I am doing like this :

   ClientSecretCredential cred = new ClientSecretCredential(TenantId, ClientId, ClientSecret);
   SecretClient client = new SecretClient(vaultUri: new Uri(KeyValutURL), cred);
   string ConnectionString = client.GetSecret(ColumnInfoSecretName).Value.Value;

Here I am getting connection string with ClientSecret but I want to get secret without using clientsecret.

Upvotes: 0

Views: 504

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136146

You would need some kind of credentials to connect to and get data from an Azure KeyVault. ClientSecretCredential is one of the available credentials.

For the list of all available credentials, please see this link: https://learn.microsoft.com/en-us/dotnet/api/azure.core.tokencredential?view=azure-dotnet

enter image description here

Upvotes: 2

Related Questions