Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Last active Apr 17, 2022
Embed
What would you like to do?
builder.Configuration.AddAzureKeyVault(
new Uri($"https://azurekeyvaultperformance-{builder.Environment.EnvironmentName}.vault.azure.net/"),
new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
ExcludeEnvironmentCredential = true,
ExcludeInteractiveBrowserCredential = true,
ExcludeAzurePowerShellCredential = true,
ExcludeSharedTokenCacheCredential = true,
ExcludeVisualStudioCodeCredential = true,
ExcludeVisualStudioCredential = true,
ExcludeAzureCliCredential = !builder.Environment.IsEnvironment("Local"),
ExcludeManagedIdentityCredential = builder.Environment.IsEnvironment("Local"),
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment