---
title: "List a SharePoint site's document libraries"
method: GET
path: "/v1/capabilities/microsoft-365/sites/{siteId}/drives"
tags: ["Capability Sources"]
---

# List a SharePoint site's document libraries

`GET /v1/capabilities/microsoft-365/sites/{siteId}/drives`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/capabilities/microsoft-365/sites/{siteId}/drives`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Lists the document libraries (drives) of one SharePoint site. Pass a library's id as driveId to browse, read or save its files. Read-only; needs the SharePoint sites permission.

## Path parameters

- `siteId` string, required

## Response `200`

Document libraries.

- Microsoft365SiteDrivesResponse
  - `ok` true, required
  - `drives` Microsoft365Drive[], required
    - `id` string, required: Pass as driveId to list, read or save files in this library.
    - `name` string, required
    - `webUrl` string, required
    - `driveType` string, required

## Other responses

- `400`: Invalid request, a folder, or an item without content.
- `401`: Sign in first.
- `403`: Organization policy blocks the selected connection.
- `409`: Connect Microsoft 365 with the needed permission, or the file changed since baseRevision (drive_conflict).
- `502`: Microsoft refused or did not return the file; the message gives Microsoft's reason.

## Changes

- **2026-10-23** `c93387179b31`: 2 breaking, 3 info
  - the response property `anyOf[subschema #2]/currentRevision` became nullable for the status `409`
  - the response property `anyOf[subschema #2]/modifiedTime` became nullable for the status `409`
  - response property `anyOf[#/components/schemas/InvalidRequestError]/details/items/path/items/` list-of-types was narrowed by removing types `number` from media type `application/json` of response `400`
  - response property `anyOf[subschema #2]/currentRevision` list-of-types was narrowed by removing types `null` from media type `application/json` of response `409`
  - …1 more
- **2026-10-23** `3e38eb291e52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/capabilities/microsoft-365/sites/:siteId/drives/get.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/8170cf4a92ca?raw)
