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 {