Untitled

mail@pastecode.io avatar
unknown
csharp
a year ago
329 B
1
Indexable
Never
var config = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
    .AddUserSecrets<Program>()
    .Build();

// Retrieve environment variables from appsettings.json
var tenantId = config["TenantId"];
var clientId = config["ClientId"];
var clientSecret = config["ClientSecret"];