List the available drives for a user or SharePoint site.
GET /drives
Do not provide a request body with this method.
If successful, this method returns a collection of [Drive resources][drive-resource] for the available drives either for the current user or the target SharePoint site.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "0123456789abc",
"driveType": "personal",
"owner": {
"user": {
"id": "12391913bac",
"displayName": "Ryan Gregg"
}
}
}
]
}
Note: The Response object is truncated for clarity. All default properties will be returned from the actual call.
In most cases, OneDrive and OneDrive for Business users will only have a single drive available, the default drive. When using OneDrive API with a SharePoint team site, this API returns the collection of document libraries created in the site.
See the [Error Responses][error-response] topic for more info about how errors are returned. [error-response]: ../misc/errors.md [drive-resource]: ../resources/drive.md