RequiredScopeAttribute Class
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.
This attribute is used on a controller, pages, or controller actions to declare (and validate) the scopes required by a web API. These scopes can be declared in two ways: hardcoding them, or declaring them in the configuration. Depending on your choice, use either one or the other of the constructors. For details, see https://aka.ms/ms-id-web/required-scope-attribute.
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method)]
public class RequiredScopeAttribute : Attribute, Microsoft.Identity.Web.IAuthRequiredScopeMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method)>]
type RequiredScopeAttribute = class
inherit Attribute
interface IAuthRequiredScopeMetadata
Public Class RequiredScopeAttribute
Inherits Attribute
Implements IAuthRequiredScopeMetadata
- Inheritance
-
RequiredScopeAttribute
- Attributes
- Implements
Constructors
RequiredScopeAttribute() |
Default constructor. |
RequiredScopeAttribute(String[]) |
Verifies that the web API is called with the right scopes.
If the token obtained for this API is on behalf of the authenticated user does not have
any of these |
Properties
AcceptedScope |
Scopes accepted by this web API. |
IsReusable |
Unused: Compatibility of interface with the Authorization Filter. |
RequiredScopesConfigurationKey |
Fully qualified name of the configuration key containing the required scopes (separated by spaces). |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für