Mid Azure

How do you access secrets from ASP.NET Core?

  • Use Azure.Extensions.AspNetCore.Configuration.Secrets package to load

secrets into IConfiguration.

var builder = new ConfigurationBuilder()

.AddAzureKeyVault(new Uri("

new DefaultAzureCredential());

var configuration = builder.Build();

var secretValue = configuration["MySecret"];

More from Microsoft Azure Tutorial

All questions for this course