Get permission

Retrieve the properties and relationships of permission object.

Prerequisites

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

  • Files.Read
  • Files.ReadWrite
  • Files.Read.All
  • Files.ReadWrite.All
  • Shares.Read.All
  • Shares.ReadWrite.All

HTTP request

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

Optional query parameters

This method supports the OData Query Parameters to help customize the response.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and Permission resource in the response body.

Example

Request

Here is an example of the request to access a permission on the root folder.

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

Here is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 762

{
  "grantedTo": {
    "user": {
      "displayName": "Ryan Gregg",
      "id": "efee1b77-fb3b-4f65-99d6-274c11914d12"
    }
  },
  "id": "1",
  "roles": [ "write" ]
}

Remarks

The Permission resource uses facets to provide information about the kind of permission represented by the resource.

Permissions with a link facet represent sharing links created on the item. Sharing links contain a unique token that provides access to the item for anyone with the link.

Permissions with a invitation facet represent permissions added by inviting specific users or groups to have access to the file.