Azure.Extensions.AspNetCore.Configuration.Secrets 1.0.2

Azure Key Vault Secrets configuration provider for Microsoft.Extensions.Configuration

The Azure.Extensions.AspNetCore.Configuration.Secrets package allows storing configuration values using Azure Key Vault Secrets.

Getting started

Install the package

Install the package with NuGet:

dotnet add package Azure.Extensions.AspNetCore.Configuration.Secrets

Prerequisites

You need an Azure subscription and [Azure Key Vault][keyvault_doc] to use this package.

To create a new Key Vault, you can use the Azure Portal, Azure PowerShell, or the Azure CLI. Here's an example using the Azure CLI:

az keyvault create --name MyVault --resource-group MyResourceGroup --location westus
az keyvault secret set --vault-name MyVault --name MySecret --value "hVFkk965BuUv"

Examples

To load initialize configuration from Azure Key Vault secrets call the AddAzureKeyVault on ConfigurationBuilder:

ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddAzureKeyVault(new Uri("<Vault URI>"), new DefaultAzureCredential());

IConfiguration configuration = builder.Build();
Console.WriteLine(configuration["MySecret"]);

The Azure Identity library provides easy Azure Active Directory support for authentication.

Next steps

Read more about configuration in ASP.NET Core.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Impressions

No packages depend on Azure.Extensions.AspNetCore.Configuration.Secrets.

https://github.com/Azure/azure-sdk-for-net/blob/Azure.Extensions.AspNetCore.Configuration.Secrets_1.0.2/sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets/CHANGELOG.md

Version Downloads Last updated
1.4.0 11 03/09/2025
1.3.2 20 09/14/2024
1.3.1 20 03/14/2024
1.3.0 23 02/13/2024
1.2.2 31 10/17/2023
1.2.1 1,777 06/15/2021
1.1.0 27 02/13/2024
1.0.2 312 03/11/2021
1.0.1 22 02/13/2024
1.0.0 24 02/13/2024
1.0.0-preview.2 21 02/13/2024