Update oAuth2PermissionGrant

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Update the properties of oAuth2PermissionGrant object.

Prerequisites

One of the following scopes is required to execute this API: Directory.ReadWrite.All or Directory.AccessAsUser.All

HTTP request

PATCH /oAuth2Permissiongrants/{id}
PATCH /users/{id | userPrincipalName}/oAuth2Permissiongrants/{id}
PATCH /drive/root/createdByUser/oAuth2Permissiongrants/{id}

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
scope String Specifies the value of the scope claim that the resource application should expect in the OAuth 2.0 access token.

Response

If successful, this method returns 204, No Content response code. It does not return anything in the response body.

Example

Request
PATCH https://graph.microsoft.com/beta/oAuth2Permissiongrants/{id}
Content-type: application/json
Content-length: 30

{
  "scope": "scope-value"
}
Response
HTTP/1.1 204 No Content