Connect a SharePoint site and BeforeQuery indexes its pages and document libraries, turning intranet knowledge — policies, IT guides, team sites — into citation-backed answers.

Prerequisites

  • A Microsoft 365 tenant with the SharePoint site you want to index.
  • Permission to create an app registration in Microsoft Entra ID (or an admin who can grant one).
  • A BeforeQuery workspace owner role.

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 application permissions that allow reading SharePoint sites and files (e.g. Sites.Read.All, Files.Read.All), then have an admin grant consent for the tenant.
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 in BeforeQuery

In the dashboard, open Project → Sources → Add source and choose SharePoint. Fill in the tenant ID, client ID, client secret, and the site (site ID or site URL), then click Add. The first sync starts automatically.

Connection settings

Keeping content in sync

Trigger a refresh with the Sync button or set a daily/weekly schedule per source. Only changed pages and files are re-embedded.

Troubleshooting

  • Authorization errors on sync? Admin consent was never granted for the Graph permissions, or the client secret expired (secrets have an expiry date — rotate it and update the source).
  • Wrong or empty content? Double-check the site identifier; if you pasted a URL, make sure it points at the site root, not a specific page.
  • Intranet-only content? Keep it away from public surfaces by marking documents restricted or by isolating the source in an internal source group.