RequiredScopeAttribute.RequiredScopesConfigurationKey Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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")]