Storage
Microsoft SharePoint Connector
Index a SharePoint library or a personal OneDrive through Microsoft Graph, after a web login: pick the site, then the folders.
Prerequisites
- A Microsoft work or school account with access to the site
- A Microsoft Entra application with `Sites.Read.All`, `Files.Read.All`, `User.Read` and `offline_access`
- `MICROSOFT_CLIENT_ID`, `MICROSOFT_CLIENT_SECRET` and `MICROSOFT_REDIRECT_URI` set on the server
Data ingested
When you connect Microsoft SharePoint, the following content becomes searchable. Every answer that uses it cites it.
| Content | What is kept |
|---|---|
| Documents | Word, PDF, PowerPoint, Excel, Markdown, text, CSV, JSON and HTML files, subfolders included |
| Modification date | Kept so an unchanged file is not re-indexed |
| Personal space | The account OneDrive is offered as a site of its own: on a new tenant the team site libraries are empty while the personal drive holds the files |
Setup
Configuration happens in the dashboard, under Integrations. No API call is needed for a normal setup.
Register the application
Entra ID → App registrations → API permissions: add `Sites.Read.All` and `Files.Read.All` (application or delegated), then grant admin consent. Create a client secret.
Configure the server
Set `MICROSOFT_CLIENT_ID`, `MICROSOFT_CLIENT_SECRET`, `MICROSOFT_REDIRECT_URI` and optionally `MICROSOFT_TENANT` (`organizations` by default) in the service environment, then restart the API.
Connect the account
Integrations → Add source → Microsoft SharePoint, then **Connect**: the Microsoft consent page opens and returns to `/auth/microsoft/callback`.
Choose the site
**Choose a site** lists what the account can open. A site whose library is not readable is refused with an explicit message rather than accepted and failing later.
Choose the folders
The folder browser lists the library level by level. Folders and individual files are both selectable; an empty selection indexes the whole library.
Configuration options
| Field | Description | Required |
|---|---|---|
| Site | SharePoint site, or **Mon espace (OneDrive)** for the personal drive. Required before browsing | Yes |
| Folder | Starting folder inside the library. Empty means the library root | No |
| Files | Individual files picked in the browser, taking precedence over the folder | No |
Best practices
- •Pick a library you actually own: `sites?search=*` also returns sites the account can see without being able to open their drive, and those are refused at selection.
- •On a fresh tenant the team site libraries are often empty — start with **Mon espace (OneDrive)**, where the account files live.
- •Keep the redirect URI identical between Entra and the server environment: Microsoft compares the two strings at both steps of the flow.
Troubleshooting
The redirect URI sent to Microsoft does not match the one declared in Entra. Set `MICROSOFT_REDIRECT_URI` to the exact registered value and restart the API.
`MICROSOFT_TENANT` holds a directory id that does not resolve. Use `organizations` (any work or school account) or the exact tenant domain.
Microsoft Graph answered 403: the account has no access to that site library. Choose another site, or the personal space. The site is now checked before it is saved.
The server environment lacks the Entra credentials. Add both variables and restart the API.
The library holds only unsupported formats, or the chosen folders are empty. The sync reports how many files were skipped for lack of extractable text.
Next steps
Once the source is connected and indexed, ask a question from the chat and check that the answer cites this source. A source that never appears in a citation is usually a source with nothing indexed: see Troubleshooting above.
