Share via


RequiredScopeAttribute.RequiredScopesConfigurationKey Property

Definition

Fully qualified name of the configuration key containing the required scopes (separated by spaces).

public string? RequiredScopesConfigurationKey { get; set; }
member this.RequiredScopesConfigurationKey : string with get, set
Public Property RequiredScopesConfigurationKey As String

Property Value

Examples

If the appsettings.json file contains a section named "AzureAd", in which a property named "Scopes" contains the required scopes, the attribute on the controller/page/action to protect should be set to the following:

[RequiredScope(RequiredScopesConfigurationKey="AzureAd:Scopes")]

Applies to