> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qontext.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SharePoint

> Connect SharePoint with Qontext

## Overview

The SharePoint connection allows Qontext to read documents, site pages, and lists from your SharePoint sites and sync their text content into your context repository. It connects to SharePoint Online through the Microsoft Graph API.

<Info>
  Only sites and content that the connected Microsoft account can access will be synced into your context repository. SharePoint permissions are always respected.
</Info>

**Supported data types:**

| Object       | Description                                                                                                       |
| ------------ | ----------------------------------------------------------------------------------------------------------------- |
| `Documents`  | Files in document libraries: `docx`, `pptx`, `xlsx`, `pdf`, `rtf`, `csv`, `md`, and `html` (up to 50 MB per file) |
| `Site pages` | SharePoint pages, including news posts and other modern pages                                                     |
| `Lists`      | SharePoint lists with their items and columns                                                                     |

**Unsupported:**

| Object             | Description                                                           |
| ------------------ | --------------------------------------------------------------------- |
| `Other file types` | Images, audio, video, and file types not listed above                 |
| `Scanned PDFs`     | Image-only PDFs contain no extractable text and are not OCR processed |
| `Large files`      | Files over 50 MB are skipped                                          |

***

## Recommended setup

Use a **dedicated integration user** in your Microsoft 365 tenant to ensure a stable and uninterrupted connection.

<div className="qontext-tip-check-wrapper">
  <Tip>Create a service account such as `qontext@yourcompany.com` and grant it read access to the SharePoint sites you want Qontext to sync. This prevents sync disruptions when employee accounts or permissions change.</Tip>
</div>

The integration user will:

* Authenticate the connection between Qontext and SharePoint.
* Access the selected sites with read-only permissions.

<Info>
  The connection uses Microsoft's read-only `Sites.Read.All` permission, which requires **admin consent** in most Microsoft 365 tenants. Have an administrator approve the consent request the first time you connect.
</Info>

***

## Setting up the connection

You can connect SharePoint from your Qontext workspace, authorize access with your Microsoft account, then choose what to sync and how often. The steps below walk you through the full flow.

<Info>
  You can also manage all your credentials, including SharePoint, from the **Sources** page.
</Info>

<Steps>
  <Step title="Open Sources in your workspace">
    In the [Qontext app](https://app.qontext.ai), open your workspace and go to the **Sources** tab, then click **+ Connect data source**.
  </Step>

  <Step title="Select SharePoint as the data source">
    Choose **SharePoint** from the list of available data sources. This starts the SharePoint connection flow.
  </Step>

  <Step title="Connect your Microsoft account">
    You can **reuse existing SharePoint credentials** (if you've already connected this Microsoft account to Qontext) or **create a new connection**.

    If you create a new credential, sign in with Microsoft when prompted. On the consent screen, review the requested permissions and click **Accept** to grant Qontext read access to your SharePoint content.
  </Step>

  <Step title="Configure what to sync (filters)" id="configure-what-to-sync-filters">
    Select what Qontext should sync into your context repository. Add entire sites, or open a site to select specific document libraries, folders, individual files, pages, and lists.

    Click the **+** next to an item to add it, or click its name to navigate into it for a more granular selection. Selected items appear at the top. Use the file type dropdown next to a selected library or folder to limit which file types are synced from it.
  </Step>

  <Step title="Set sync frequency">
    Choose how often Qontext should refresh data from SharePoint (e.g. daily, weekly, monthly). More frequent syncs keep the context repository up to date but use more resources.
  </Step>

  <Step title="Review and create connection">
    Review your choices (account, selection, frequency), then confirm to create the connection. Qontext will start the initial sync shortly after.
  </Step>
</Steps>

***

## Managing permissions

### SharePoint OAuth scopes

When connecting, you'll see a Microsoft consent screen listing the permissions Qontext needs; they are read-only:

```text theme={null}
- Sign you in and read your profile
- Read items in all site collections
- Maintain access to data you have given it access to
```

"Read items in all site collections" is Microsoft's wording for the `Sites.Read.All` permission. It applies on behalf of the connected user, so Qontext can only ever see what that account can see. Qontext does not create, edit, or delete anything in SharePoint.

### SharePoint permissions

* Use a **single integration user** to manage SharePoint access for Qontext to avoid permission conflicts.
* If you don't see a site or library during filter setup, verify that the connected account has access to it in SharePoint.

***

## Sync latency

The initial sync time depends on how many sites, documents, pages, and lists are in scope. Large environments can take **up to 12 hours** to fully sync.

<Info>
  Subsequent syncs are **incremental**: Qontext uses SharePoint's built-in change tracking to process only what was added, changed, or removed since the last sync. Renamed or moved files are updated in place instead of duplicated.
</Info>

***

## FAQ

<AccordionGroup>
  <Accordion title="Who can set up the SharePoint connection?">
    Any workspace member with a Microsoft account that has access to the relevant SharePoint sites. Because the `Sites.Read.All` permission requires admin consent in most tenants, a Microsoft 365 administrator may need to approve the connection the first time.
  </Accordion>

  <Accordion title="Does Qontext support SharePoint Server (on-premises)?">
    Qontext supports **SharePoint Online** (Microsoft 365). On-premises SharePoint Server deployments are not supported. If you use SharePoint Server, contact [support@qontext.ai](mailto:support@qontext.ai) to discuss your options.
  </Accordion>

  <Accordion title="Can I connect multiple Microsoft accounts or tenants?">
    Yes. You can create multiple SharePoint connections from the **Sources** tab in your Qontext workspace. Add each account or tenant as a separate data source.
  </Accordion>

  <Accordion title="How do I manually refresh SharePoint data?">
    Manual refresh for SharePoint connections is available via the **Sources** tab. Navigate to the respective SharePoint connection and open the **Syncs** tab. In the Sync settings, you can select **Resync all data**.
  </Accordion>

  <Accordion title="What happens if I disconnect SharePoint?">
    Disconnecting stops further syncs. Content already synced from SharePoint remains in your context repository. For data removal, contact [support@qontext.ai](mailto:support@qontext.ai).
  </Accordion>

  <Accordion title="How can I limit what Qontext accesses?">
    By default, Qontext only syncs content the connected Microsoft account can access. Additionally, you can add [filters](#configure-what-to-sync-filters) to every connection as described in the setup flow.
  </Accordion>
</AccordionGroup>
