Skip to main content

Microsoft SharePoint

Kapa provides an integration to pull files from the document libraries of your Microsoft SharePoint sites. This integration allows you to use the documents your team already maintains in SharePoint to power your AI assistant with accurate information.

Prerequisites​

  • A Microsoft 365 account with access to the SharePoint sites you want to sync
  • Permission to consent to third-party applications in your Microsoft tenant, or a Microsoft 365 administrator who can grant it
  • Files in supported formats

Data ingested​

When you connect Kapa to Microsoft SharePoint, the following data is ingested:

  • Full text content of supported file types
  • File names and modification timestamps
  • File URLs, which Kapa uses in citations

Permissions required​

Kapa requests the following Microsoft Graph permissions when you connect:

PermissionPurposeSecurity considerations
Sites.Read.AllAllows Kapa to list the sites the account can accessRead-only access to site listings
Files.Read.AllEnables Kapa to read files in the sites' document librariesRead-only access to file content
User.ReadShows the connected account in the Kapa platformRead-only access to the account profile
offline_accessKeeps the connection active for scheduled syncsKapa stores the refresh token encrypted

Kapa inherits the access of the connected Microsoft account. It can only read the sites, folders, and files that this account can view.

Supported file formats​

The Microsoft SharePoint integration currently supports:

  • Markdown: .md files
  • MDX: .mdx files
  • Text: .txt files
  • Word: .docx files
  • PDF: .pdf files

Files in other formats and files larger than 1 GB are ignored. For how Kapa processes PDFs, see PDF documents.

note

For text-based files (Markdown and plain text), ingestion is limited to 10 million characters. Kapa does not ingest files that exceed this limit.

Ownership​

The Microsoft SharePoint source is tied to the Kapa user who completes the OAuth connection. Only that user can modify the source configuration. Other team members can view the connection details but cannot change them.

If the connecting user's Kapa account is later deleted, the source becomes locked and cannot be reconfigured. In that situation, create a new Microsoft SharePoint source.

Setup​

Step 1: Connect your Microsoft account​

  1. Go to the Sources tab in the Kapa platform
  2. Click Add new source
  3. Select Microsoft SharePoint as the source type
  4. Enter a source name and click Continue
  5. Click Connect Microsoft SharePoint
  6. A Microsoft sign-in window opens. Sign in with an account that has access to the sites you want to sync
  7. Accept the requested permissions when prompted
  8. The window closes and the Connect step shows the connected account. Click Next
note

Some Microsoft tenants require administrator consent for these permissions. If Microsoft asks for administrator approval, ask a Microsoft 365 administrator to grant it, then connect again.

Step 2: Select content​

  1. Select at least one site in the Sites filter
  2. Optionally, use the Included and Excluded tabs to choose folders and files
  3. Optionally, set Last updated after to skip older files
  4. Click Deploy to begin the ingestion process

Configuration options​

The following configuration options are available for the Microsoft SharePoint integration:

OptionDescriptionDefaultRequired
SitesSharePoint sites whose document libraries Kapa ingestsNoneYes
Included foldersLimit the sync to the contents of these foldersNoneNo
Included filesFiles to sync in addition to the site and folder selectionNoneNo
Excluded foldersFolders to skip, with all their contentsNoneNo
Excluded filesFiles to skip, even inside included foldersNoneNo
Last updated afterSkip files last modified before this dateNoneNo

Best practices​

Content selection​

There are no strict requirements on how you organize your SharePoint sites. Kapa will:

  • Ingest all supported files in the selected sites, including those in subfolders
  • Limit the sync to included folders when you select any
  • Sync included files even when they are outside the selected sites and folders
  • Skip excluded folders and files

Dedicated account​

Connect a Microsoft account created only for Kapa (for example, kapa-crawler@company.com) and give it read access to the relevant sites. The source then keeps working when employees leave, and you can audit what Kapa can read.

Troubleshooting​

  • Connection error or syncs stop: Click Reconnect and sign in again. Check that the account is active and that an administrator has not revoked consent for Kapa
  • Administrator approval required: Ask a Microsoft 365 administrator to grant consent for Kapa, then connect again
  • Files not appearing: Check that your files are in supported formats, inside the selected sites or folders, not excluded, and visible to the connected account
  • "Only [user] can edit it": The source was connected by another Kapa user. Contact that user to make changes, or create a new source