List items shared with the signed-in user

Retrieve a collection of DriveItem resources that have been shared with the owner of the Drive.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All
Delegated (personal Microsoft account) Files.Read.All, Files.ReadWrite.All
Application Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All

Additionally, without one of the All scopes, shared items returned from this API will not be accessible.

HTTP request

GET /me/drive/sharedWithMe

Request body

Do not supply a request body for this method.

Example

GET https://graph.microsoft.com/v1.0/me/drive/sharedWithMe

Response

This returns a collection of DriveItem resources which contain the DriveItem resources shared with the owner of the drive. In this example, since the drive is the user's default drive, this returns items shared with the signed in user.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "value": [
    {
      "id": "1312abc",
      "remoteItem": {
        "id": "1991210caf!192",
        "name": "March Proposal.docx",
        "file": { },
        "size": 19121,
        "parentReference": {
          "driveId": "1991210caf",
          "id": "1991210caf!104"
        }
      }
    },
    {
      "id": "1312def",
      "remoteItem": {
        "id": "1991210caf!1991",
        "name": "Team Roster.xlsx",
        "file": { },
        "size": 37619,
        "parentReference": {
          "driveId": "1991210caf",
          "id": "1991210caf!104"
        }
      }
    }
  ]
}

Remarks

DriveItems returned from the sharedWithMe action will always include the remoteItem facet which indicates they are items from a different drive. To access the shared DriveItem resource, you will need to make a request using the information provided in remoteItem in the following format:

GET https://graph.microsoft.com/v1.0/drives/{remoteItem.parentReference.driveId}/items/{remoteItem.id}