diff --git a/src/Digdir.Domain.Dialogporten.GraphQL/Common/Authorization/AuthorizationOptionsSetup.cs b/src/Digdir.Domain.Dialogporten.GraphQL/Common/Authorization/AuthorizationOptionsSetup.cs index 8785bd5c4..257b1dbbb 100644 --- a/src/Digdir.Domain.Dialogporten.GraphQL/Common/Authorization/AuthorizationOptionsSetup.cs +++ b/src/Digdir.Domain.Dialogporten.GraphQL/Common/Authorization/AuthorizationOptionsSetup.cs @@ -39,7 +39,7 @@ public void Configure(AuthorizationOptions options) .RequireScope(AuthorizationScope.ServiceProvider)); options.AddPolicy(AuthorizationPolicy.ServiceProviderSearch, builder => builder - .Combine(options.DefaultPolicy) + .Combine(options.GetPolicy(AuthorizationPolicy.ServiceProvider)!) .RequireScope(AuthorizationScope.ServiceProviderSearch)); options.AddPolicy(AuthorizationPolicy.Testing, builder => builder diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationOptionsSetup.cs b/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationOptionsSetup.cs index 5a17303a8..314e9fa58 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationOptionsSetup.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationOptionsSetup.cs @@ -35,7 +35,7 @@ public void Configure(AuthorizationOptions options) .RequireScope(AuthorizationScope.ServiceProvider)); options.AddPolicy(AuthorizationPolicy.ServiceProviderSearch, builder => builder - .Combine(options.DefaultPolicy) + .Combine(options.GetPolicy(AuthorizationPolicy.ServiceProvider)!) .RequireScope(AuthorizationScope.ServiceProviderSearch)); options.AddPolicy(AuthorizationPolicy.Testing, builder => builder