Skip to content

SharePoint Connector

Use this page when you need the Microsoft-side setup details for the SharePoint connector. For shared connector behavior, start with Connectors Overview and Provider Auth And Setup.

  • Runtime status: implemented, live-only, read-only
  • Connector key: sharepoint
  • Live domains and canonical tools:
    • knowledge-page through knowledge-page-live-query for selected sites and site pages
    • file-resource through file-resource-live-query for document-library files/folders and bounded transient file reads
    • business-record through business-record-live-query for lists, list items, columns, and custom fields
  • Auth binding: Better Auth generic OAuth provider id microsoft
  • Callback URI examples:
    • http://localhost:3001/api/auth/oauth2/callback/microsoft
    • https://auth.example.com/api/auth/oauth2/callback/microsoft
  • Setup console URL:
  • Required connector scopes:
    • Sites.Read.All
  • Required resource selection:
    • Save selected SharePoint sites through the shared connector resourceSelection model.
    • Lists, drives/libraries, and folders are optional refinements after sites are selected.
  • SharePoint uses Microsoft Graph v1.0 only. The runtime uses Microsoft Search where it is the stable provider-recommended fit for SharePoint discovery, and direct Graph APIs for selected-site reads such as site pages, lists/listItems/columns, drives, folders, and bounded file content.
  • Delegated /sites list-all is not a discovery path. Use selected-site hydration, site search, or explicit site URL/id resolution.
  • Graph @odata.nextLink values are validated against the expected https://graph.microsoft.com origin and allowed paths before bearer tokens are attached. Raw nextLinks, Graph ids, tenant ids, and tokens stay out of grounding and source metadata.
  • Microsoft Graph SharePoint site ids can contain commas. Treat selected site ids and smoke fixture REAL_PROVIDER_E2E_SHAREPOINT_SITE_ID values as opaque strings, not comma-delimited lists.
  • SharePoint Search custom fields and aggregations depend on tenant Search schema configuration. Unsupported fields should produce bounded or unsupported coverage copy, not fabricated results.
  • SharePoint is not an upload/write connector in this pass. Do not request Sites.ReadWrite.All, Files.ReadWrite.All, upload adapters, sync buttons, Meltano taps, embeddings, SharePoint REST, or CSOM until a separate accepted design adds them.
  • SharePoint shares the microsoft OAuth provider with OneDrive, Outlook, Microsoft Calendar, Microsoft Contacts, and OneNote. Reauthorization should preserve active sibling scopes, but SharePoint selected sites are connector-level scoped resources, not account-level Microsoft provider-family scopes.

apps/api/.env.example documents the SharePoint smoke fixture variables:

  • REAL_PROVIDER_E2E_SHAREPOINT_ACCOUNT_ID
  • REAL_PROVIDER_E2E_SHAREPOINT_SITE_ID
  • optional page, file, list, and query pins for stronger assertions

Use the real-provider doctor/smoke lane without printing secrets or reading real .env files manually.

  • packages/domain/src/connectors/connectorRegistry.ts
  • apps/api/src/connectors/providerManifests.ts
  • apps/api/src/connectors/sharePointLiveAdapters.ts
  • apps/api/src/connectors/providerOptions.ts
  • docs/features/connectors/spec.md
  • docs/features/live-query/spec.md