SharePoint and OneDrive
Index the files of one SharePoint site's document library, or the signed-in
person's OneDrive. Connector type: microsoft_365.
This connector follows the published Microsoft Graph v1.0 API. It has not yet been verified against a live Microsoft 365 tenant. Run a first sync on a small folder and check the run before relying on it.
Setup
- The deployment needs its own Microsoft app registration, with
SOURCE_MICROSOFT_CLIENT_IDandSOURCE_MICROSOFT_CLIENT_SECRETset (SOURCE_MICROSOFT_TENANTdefaults tocommon). The sign-in asks forUser.Read,Files.Read.All,Sites.Read.Allandoffline_access. - In the console, choose SharePoint and OneDrive under Add source and
then Sign in with Microsoft. Through the API, call
POST /api/v1/connections/microsoft/authorize, send the operator's browser to the returned address, and keep theconnection_idthat comes back. See Sign-in connections. - Create the
microsoft_365connector with that sign-in and the settings below, then start a sync.
| Setting | Description |
|---|---|
site_url | The SharePoint site address, for example https://contoso.sharepoint.com/sites/Admissions. Empty reads the OneDrive of the person who signed in |
folder_path | A folder inside the library, for example Policies/2026. Empty reads every folder |
mirror_permissions | Limit each file to the people it is shared with. Default false. Admins only |
What gets indexed
PDF, Word (DOCX), PowerPoint (PPTX) and Excel (XLSX) files, and text files
(.txt, .md, .csv, .html, .json). Other file types are skipped and
reported on the run as unsupported_format. Files larger than 50 MB fail with
too_large.
Sync behaviour
- Every sync lists the whole library, so files removed at the source are deleted from the index. Only files changed since the last applied sync are downloaded.
- With
folder_path, files in that folder and every folder inside it are synced. - When Microsoft asks the connector to slow down, it waits for the time Microsoft gives and tries again. An expired sign-in is renewed during a long sync.
- A refused sign-in fails the run with
source_refused. Sign in again; through the API, update the connector'sconnection_id.
Respecting sharing
With mirror_permissions on, each file's sharing is read on every sync:
| Sharing | Who can get answers from the file |
|---|---|
| An organization-wide link | Everyone in the organization |
| A person | The user with that email |
| A mail-enabled group | Members of that group, as supplied through the connector's access groups |
SharePoint site groups have no email address to match, so a file shared only
through a site group is readable by organization admins alone. As with Google
Drive, sharing must be re-confirmed by a sync within ACL_MAX_STALENESS_HOURS
(default 24) or the document is hidden. With mirroring off, everything the
connector indexes is available to everyone who can use the project.