diff --git a/web-app-aspnet/Program.cs b/web-app-aspnet/Program.cs index e86d4e9..45b352d 100644 --- a/web-app-aspnet/Program.cs +++ b/web-app-aspnet/Program.cs @@ -7,8 +7,7 @@ // WebApplicationBuilder builder = WebApplication.CreateBuilder(args); -IEnumerable? initialScopes = builder.Configuration["DownstreamApi:Scopes"]?.Split(' '); - +IEnumerable? initialScopes = builder.Configuration.GetSection("DownstreamApi:Scopes").Get>(); builder.Services.AddMicrosoftIdentityWebAppAuthentication(builder.Configuration, "AzureAd") .EnableTokenAcquisitionToCallDownstreamApi(initialScopes)