How to set a secret in Azure Key Vault from a local asp.net application
问题 I have a local asp.net core 3.1 application that I want to set a secret in an Azure Key Vault. The following is the code I used from Microsoft: string secretName = "xxSecret"; string keyVaultName = Environment.GetEnvironmentVariable("KEY_VAULT_NAME"); var kvUri = "https://" + keyVaultName + ".vault.azure.net"; var secretClient = new SecretClient(new Uri(kvUri), new DefaultAzureCredential()); string secretValue = "test"; secretClient.SetSecret(secretName, secretValue); KeyVaultSecret secret =