OneDrive is its own source type because a document library belongs to a site and a OneDrive belongs to a person — there is no Site ID for somebody’s own OneDrive.
Prerequisites
- A Microsoft 365 tenant containing the OneDrive you want to index.
- Permission to create an app registration in Microsoft Entra ID (or an admin who can grant one).
- A BeforeQuery workspace
ownerrole.
Set up the connector
1
Register an application in Microsoft Entra ID
In the Azure portal, open Microsoft Entra ID → App registrations → New registration. Note the Application (client) ID and Directory (tenant) ID.
2
Grant Microsoft Graph permissions
Under API permissions, add the application permission
Files.Read.All and have an admin grant consent for the tenant. The connector authenticates app-only, so nobody signs in at sync time.3
Create a client secret
Under Certificates & secrets, create a client secret and copy its value immediately — it’s shown only once.
4
Add the source
Open Knowledge Base → Sources → Add source and choose OneDrive. Fill in the tenant, client ID and secret, then say whose drive to index. Click Add.
Connection settings
Data ingested
Each file becomes one document: its OneDrive link, a title taken from the document’s own first heading and falling back to the file name, and its content as markdown. Every file in the drive is walked, through subfolders, whose type the extractor can read:.pdf, .docx, .xlsx, .xlsm, .xltx, .xltm, .md, .mdx, .txt, .html, .htm, .csv, .tsv. Anything else is reported as a skipped item on the source, so you can see what was reached and not read.
Keeping content in sync
OneDrive re-syncs every 10 minutes — there is no schedule to configure, and Sync on the source’s page runs one now if you cannot wait. Only changed content is re-embedded. See Sources Overview.Troubleshooting
- Authorization errors on sync? Admin consent was never granted for
Files.Read.All, or the client secret expired — rotate it and update the source. - Nothing indexed? Check the user email resolves to a licensed account with a provisioned OneDrive, and that the folder path matches exactly.
- Some files missing? They’re a type the extractor can’t read — scanned images with no text layer,
.pptx, legacy.xls. The sync results name each one. - Personal drive on a public widget? Mark the documents
restricted, or isolate the source in an internal source group.