RequiredScopeOrAppPermissionAttribute 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 or app permissions required by a web API. These scopes or app permissions 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-or-app-permissions-attribute.
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method)]
public class RequiredScopeOrAppPermissionAttribute : Attribute, Microsoft.Identity.Web.IAuthRequiredScopeOrAppPermissionMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method)>]
type RequiredScopeOrAppPermissionAttribute = class
inherit Attribute
interface IAuthRequiredScopeOrAppPermissionMetadata
Public Class RequiredScopeOrAppPermissionAttribute
Inherits Attribute
Implements IAuthRequiredScopeOrAppPermissionMetadata
- Inheritance
-
RequiredScopeOrAppPermissionAttribute
- Attributes
- Implements
Constructors
RequiredScopeOrAppPermissionAttribute() |
Default constructor. |
RequiredScopeOrAppPermissionAttribute(String[], String[]) |
Verifies that the web API is called with the right app permissions.
If the token obtained for this API is on behalf of the authenticated user does not have
any of these |
Properties
AcceptedAppPermission |
App permissions accepted by this web API. App permissions appear in the roles claim of the token. |
AcceptedScope |
Scopes accepted by this web API. |
RequiredAppPermissionsConfigurationKey |
Fully qualified name of the configuration key containing the required app permissions (separated by spaces). |
RequiredScopesConfigurationKey |
Fully qualified name of the configuration key containing the required scopes (separated by spaces). |
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기