drive resource type

Namespace: microsoft.graph

The top-level object that represents a user's OneDrive or a document library in SharePoint.

OneDrive users will always have at least one drive available, their default drive. Users without a OneDrive license may not have a default drive available.


Method Return type Description
Get drive drive Get metadata about a drive
Get drive root driveItem Get root folder of a drive
List followed items driveItem collection List the user's followed driveItems
List children driveItem collection List children of the root folder of a drive
List changes driveItem collection List changes for all driveItems in the Drive
Search driveItem collection Search for driveItems in a drive
Get special folder driveItem Access a special folder by its canonical name


Property Type Description
createdBy identitySet Identity of the user, device, or application which created the item. Read-only.
createdDateTime dateTimeOffset Date and time of item creation. Read-only.
description String Provide a user-visible description of the drive. Read-write.
driveType String Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only.
id String The unique identifier of the drive. Read-only.
lastModifiedBy identitySet Identity of the user, device, and application which last modified the item. Read-only.
lastModifiedDateTime dateTimeOffset Date and time the item was last modified. Read-only.
name string The name of the item. Read-write.
owner identitySet Optional. The user account that owns the drive. Read-only.
quota quota Optional. Information about the drive's storage space quota. Read-only.
sharepointIds sharepointIds Returns identifiers useful for SharePoint REST compatibility. Read-only. This property is not returned by default and must be selected using the $select query parameter.
system systemFacet If present, indicates that this is a system-managed drive. Read-only.
webUrl string (url) URL that displays the resource in the browser. Read-only.


Relationship Type Description
bundles driveItem collection Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive.
following driveItem collection The list of items the user is following. Only in OneDrive for Business.
items driveItem collection All items contained in the drive. Read-only. Nullable.
list list For drives in SharePoint, the underlying document library list. Read-only. Nullable.
root driveItem The root folder of the drive. Read-only.
special driveItem collection Collection of common folders available in OneDrive. Read-only. Nullable.

JSON representation

The following is a JSON representation of this resource.

The drive resource is derived from baseItem and inherits properties from that resource.

  "createdBy": {"@odata.type": "microsoft.graph.identitySet"},
  "createdDateTime": "string (timestamp)",
  "description": "string",
  "driveType": "personal | business | documentLibrary",
  "following": [{"@odata.type": "microsoft.graph.driveItem"}],
  "id": "string",
  "items": [{"@odata.type": "microsoft.graph.driveItem"}],
  "lastModifiedBy": {"@odata.type": "microsoft.graph.identitySet"},
  "lastModifiedDateTime": "string (timestamp)",
  "name": "string",
  "owner": {"@odata.type": "microsoft.graph.identitySet"},
  "quota": {"@odata.type": "microsoft.graph.quota"},
  "root": {"@odata.type": "microsoft.graph.driveItem"},
  "sharepointIds": {"@odata.type": "microsoft.graph.sharepointIds"},
  "special": [{"@odata.type": "microsoft.graph.driveItem"}],
  "system": {"@odata.type": "microsoft.graph.systemFacet"},
  "webUrl": "string",