Connect SharePoint or OneDrive
This content is not available in your language yet.
A SharePoint / OneDrive source keeps a collection in step with a SharePoint document library, a folder inside one, or a user’s OneDrive. The platform signs in as an application you register in Microsoft Entra — no user account, no interactive login — and reads through Microsoft Graph.
Everything Connect a source says about schedules, Sync now, the run log and what happens when a file is edited, removed or deleted applies unchanged. This page covers what is specific to Microsoft 365.
Status. This source type is built against Microsoft’s documented Graph endpoints and tested against a simulated tenant. It has not yet been exercised against a live Microsoft 365 tenant by us. If you are the first to connect one, expect to work with support on anything that surprises it, and please tell us what you find.
Before you start: the app registration
Section titled “Before you start: the app registration”You need an Entra app registration with a client secret and one application permission, consented by an administrator.
- In the Entra admin center, open App registrations → New registration. Any name; single-tenant; no redirect URI.
- Note the Application (client) ID and the Directory (tenant) ID from the overview page.
- Under Certificates & secrets, add a client secret and copy its value now — it is shown once.
- Under API permissions, add a Microsoft Graph → Application
permission:
Sites.Read.Allto read any site in the tenant, orFiles.Read.Allwhen the source is a user’s OneDrive, orSites.Selectedto restrict the app to named sites. This permission grants nothing by itself: a site administrator must then add areadgrant for each site to the app, through Graph’s site permissions endpoint or the SharePoint admin tooling.
- Choose Grant admin consent for the tenant.
Add the source
Section titled “Add the source”Open a collection’s Sources tab, choose Add source, pick SharePoint / OneDrive, and fill in:
- Target — a SharePoint site, or a OneDrive.
- Site URL — for a site:
https://contoso.sharepoint.com/sites/Handbook. - OneDrive owner — for a OneDrive: the user’s sign-in name,
alice@contoso.com. - Library — the document library’s name. Blank means the site’s default library, which is usually Documents.
- Folder — optional. A path inside the library,
/Policies/2026, to sync only that folder and everything below it. - Tenant ID, Application (client) ID, Client secret — from the registration above. The secret is write-only once saved.
Test connection resolves the site and library and requests the first page of the listing — the same calls a sync makes — so a wrong secret, a missing consent, a misspelled library and an unreachable site each fail here with a message that says which.
What becomes a document
Section titled “What becomes a document”Every file in the library or folder, at any depth, whose type the platform can parse — the same set the upload screen accepts. Folders and unsupported types are skipped silently. The document’s citation link is the file’s own SharePoint URL, so a reader lands in SharePoint.
How changes are detected
Section titled “How changes are detected”Each run lists the whole library or folder in one pass and compares each file’s Graph eTag with the one it saw last time. An unchanged file is skipped without being downloaded. A renamed or moved file has a new eTag and is downloaded again, but its content is unchanged, so it resolves to the same document rather than a new one.
A file deleted in SharePoint disappears from the listing; the platform pauses its document at once and deletes it after the source’s grace period, as Connect a source describes.
Test-connection messages
Section titled “Test-connection messages”- the client secret is wrong or has expired — regenerate it under Certificates & secrets and save the new value.
- no app registration with that client id exists in this tenant — the client ID or the tenant ID is from a different registration or tenant.
- the app has not been granted (and admin-consented) Sites.Read.All or Files.Read.All — add the application permission and grant admin consent.
- the app is not allowed to read this site — under
Sites.Selected, this site has no grant yet. - no library named ‘X’; this site has: … — pick one of the names listed.
- the site, library, folder or user was not found — check the URL, the folder path, or the OneDrive owner’s sign-in name.
