List items shared with the signed-in user

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

Prerequisites

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

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

Note: while the /sharedWithMe request will succeed with Files.Read or Files.ReadWrite scopes, some properties may be missing. 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}