oAuth2PermissionGrant 资源类型oAuth2PermissionGrant resource type

重要说明: Microsoft Graph 中 /beta 版本下的 API 是预览版,可能会发生变化。Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

代表已被授予对 (由服务主体) 应用程序的 OAuth 2.0 范围 (委派权限) 为用户或管理员同意过程的一部分。Represents the OAuth 2.0 scopes (delegated permissions) that have been granted to an application (represented by a service principal) as part of the user or admin consent process.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

  "clientId": "string",
  "consentType": "string",
  "expiryTime": "String (timestamp)",
  "id": "string (identifier)",
  "principalId": "string",
  "resourceId": "string",
  "scope": "string",
  "startTime": "String (timestamp)"


属性Property 类型Type DescriptionDescription
clientIdclientId 字符串String 服务主体的 id 授予同意以访问 (由 resourceId 属性) 的资源时模拟用户。The id of the service principal granted consent to impersonate the user when accessing the resource (represented by the resourceId property).
consentTypeconsentType 字符串String 指示由 (代表组织) 管理员或个人是否提供同意。Indicates if consent was provided by the administrator (on behalf of the organization) or by an individual. 可能的值为AllPrincipals主体The possible values are AllPrincipals or Principal.
expiryTimeexpiryTime DateTimeOffsetDateTimeOffset 目前,到期时间值将被忽略。Currently, the expiry time value is ignored.
idid 字符串String 唯一标识符。Unique identifier. 此为只读属性。Read-only.
principalIdprincipalId 字符串String 如果 consentType AllPrincipals此值为 null,并同意应用于组织中的所有用户。If consentType is AllPrincipals this value is null, and the consent applies to all users in the organization. 如果主体consentType,此属性将指定的用户的授予许可,并且仅适用于该用户的 id。If consentType is Principal, then this property specifies the id of the user that granted consent and applies only for that user.
resourceIdresourceId StringString 指定已向其授予访问的资源服务主体的 id。Specifies the id of the resource service principal to which access has been granted.
scopescope 字符串String OAuth 2.0 访问令牌中指定资源应用程序应产生预期范围声明的值。Specifies the value of the scope claim that the resource application should expect in the OAuth 2.0 access token. 例如, User.ReadFor example, User.Read
startTimestartTime DateTimeOffsetDateTimeOffset 目前,开始时间值将被忽略。Currently, the start time value is ignored.




方法Method 返回类型Return Type 说明Description
获取 oAuth2PermissionGrantGet oAuth2PermissionGrant oAuth2PermissionGrantoAuth2PermissionGrant 读取属性和 oAuth2PermissionGrant 对象的关系。Read properties and relationships of oAuth2PermissionGrant object.
列表 oAuth2PermissionGrantsList oAuth2PermissionGrants oAuth2PermissionGrant集合oAuth2PermissionGrant collection 检索 oauth2PermissionGrant 对象的列表。Retrieve a list of oauth2PermissionGrant objects.
更新 oAuth2PermissionGrantUpdate oAuth2PermissionGrant oAuth2PermissionGrantoAuth2PermissionGrant 更新 oAuth2PermissionGrant 对象。Update oAuth2PermissionGrant object.
删除 oAuth2PermissionGrantDelete oAuth2PermissionGrant None 删除 oAuth2PermissionGrant 对象。Delete oAuth2PermissionGrant object.