Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Last active April 17, 2022 04:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save scottsauber/885370bb1523244ba1df02c977cd7f15 to your computer and use it in GitHub Desktop.
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,
// The following two I'm explicitly setting to false but they could be omitted because false is the default
ExcludeAzureCliCredential = false,
ExcludeManagedIdentityCredential = false,
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment