From da2fbd7bba111ebdbe1a141fdb584596bb36bf68 Mon Sep 17 00:00:00 2001 From: Nyalls Hemingway <86660154+nyluhe@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:30:18 +0000 Subject: [PATCH] Program | Initial Scopes retrieval Amended method for getting initialScopes, as previous implementation returns null. --- web-app-aspnet/Program.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)