From 9e489c6cea4bba490d0874189ca2ae48ff7c16a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 19:02:24 +0000 Subject: [PATCH] Fix https://github.com/aspnet/AspNetCore-ManualTests/issues/828#issuecomment-916732011 (#36467) Co-authored-by: Jean-Marc Prieur --- .../Server/Controllers/WeatherForecastController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs index 42c6dadcaea..1be736c1ce2 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Controllers/WeatherForecastController.cs @@ -21,8 +21,10 @@ namespace ComponentsWebAssembly_CSharp.Server.Controllers; #endif [ApiController] [Route("[controller]")] -#if (OrganizationalAuth || IndividualB2CAuth) +#if (OrganizationalAuth) [RequiredScope(RequiredScopesConfigurationKey = "AzureAd:Scopes")] +#elseif (IndividualB2CAuth) +[RequiredScope(RequiredScopesConfigurationKey = "AzureAdB2C:Scopes")] #endif public class WeatherForecastController : ControllerBase {