Pragence

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

  1. The deployment needs its own Microsoft app registration, with SOURCE_MICROSOFT_CLIENT_ID and SOURCE_MICROSOFT_CLIENT_SECRET set (SOURCE_MICROSOFT_TENANT defaults to common). The sign-in asks for User.Read, Files.Read.All, Sites.Read.All and offline_access.
  2. 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 the connection_id that comes back. See Sign-in connections.
  3. Create the microsoft_365 connector with that sign-in and the settings below, then start a sync.
SettingDescription
site_urlThe SharePoint site address, for example https://contoso.sharepoint.com/sites/Admissions. Empty reads the OneDrive of the person who signed in
folder_pathA folder inside the library, for example Policies/2026. Empty reads every folder
mirror_permissionsLimit 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's connection_id.

Respecting sharing

With mirror_permissions on, each file's sharing is read on every sync:

SharingWho can get answers from the file
An organization-wide linkEveryone in the organization
A personThe user with that email
A mail-enabled groupMembers 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.

On this page