Delete permission

Remove access to a DriveItem.

Only permissions that are not inherited can be deleted. The inheritedFrom property must be null.

Prerequisites

One of the following scopes is required to execute this API:

  • Files.ReadWrite

HTTP request

DELETE /me/drive/items/{item-id}/permissions/{perm-id}
DELETE /me/drive/root:/{path}:/permissions/{perm-id}
DELETE /groups/{group-id}/drive/items/{item-id}/permissions/{perm-id}
DELETE /drives/{drive-id}/items/{item-id}/permissions/{perm-id}

Request headers

Name Type Description
if-match string If this request header is included and the eTag (or cTag) provided does not match the current tag on the item, a 412 Precondition Failed response is returned and the item will not be deleted.

Request body

Do not supply a request body for this method.

Response

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

Example

Request

Here is an example of the request.

DELETE https://graph.microsoft.com/v1.0/me/drive/root/items/{item-id}/permissions/{perm-id}
Response

Here is an example of the response.

HTTP/1.1 204 No Content

Remarks

  • Drives with a driveType of personal (OneDrive Personal) cannot create or modify permissions on the root DriveItem.