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

# SharePoint Knowledge Base

> Sync SharePoint sites and document libraries so Alex can answer candidate questions from them

Connecting SharePoint lets Alex answer candidate questions from your intranet — site pages and the documents in your libraries — without copying anything out of Microsoft 365.

## Overview

You authorize Alex against one Microsoft tenant, then choose **sites** and, within them, **document libraries**. Site pages and library files are indexed separately, so you can take a site's pages without its files, or the reverse.

Access is **read-only**. Alex never uploads, edits, moves, or deletes anything in SharePoint.

## Permissions Requested

| Scope | What it's for |
| - | - |
| `Sites.Read.All` | List sites and libraries, and read the pages and files you selected |
| `offline_access` | Keep the connection alive without re-authorizing |
| `openid`, `profile` | Identify the authorizing account |

> [!WARNING]
>
> `Sites.Read.All` is a tenant-wide read scope — it's what Microsoft Graph offers for reading SharePoint content, and there is no per-site equivalent. Alex only ever *reads* the sites and libraries you explicitly tick; nothing else is fetched or indexed. Your Microsoft administrator will usually need to grant admin consent the first time someone connects.

## Installation

**1. Open the Knowledge Base settings**

In the Alex app, go to **Settings** > **Knowledge Base** and click the **SharePoint** card.

**2. Connect**

Click **Connect**, sign in with a Microsoft account on your tenant, and approve the permissions. You'll return to Alex with the message *"SharePoint connected — choose which sites and libraries to sync"*.

**3. Choose sites and libraries**

Tick the sites Alex may read pages from, and tick the document libraries inside them whose files should sync.

**4. Save**

Click **Update Connection**. The first sync starts within 15 minutes.

> [!NOTE]
>
> Connect with a durable service or ops account rather than an individual's. If you later need to **Reconnect**, you must authorize against the *same Microsoft tenant*.

## Choosing What Syncs

![SharePoint settings showing sites with nested document libraries, an add-a-site-by-URL field, and a freshness filter](https://mintcdn.com/apriora/1dLms1nR32YN9Z59/images/kb-sharepoint-settings.jpg?fit=max\&auto=format\&n=1dLms1nR32YN9Z59\&q=85\&s=3ea48bbd949c0210625ac5a8dbaac352)

### Sites and libraries

Ticking a **site** opts its site pages into the sync. Ticking a **document library** beneath it — usually named *Documents* — opts that library's files in. The two are independent.

If a site you want doesn't appear in the list, paste its URL into the **Add a site by URL** field (`https://yourtenant.sharepoint.com/sites/...`) and click **Add site**.

The summary line previews the result — for example, *"2 pages and 4 files will sync."*

### Per-file control

Click **files…** next to a library to open its file list.

![Files in Documents dialog explaining that unchecked files stop syncing and are excluded from answers](https://mintcdn.com/apriora/1dLms1nR32YN9Z59/images/kb-sharepoint-files-dialog.jpg?fit=max\&auto=format\&n=1dLms1nR32YN9Z59\&q=85\&s=b8b039159057f46cc6a504de3f018fe4)

From here you can switch individual files off, or select several and click **Set scope for selected** to [restrict them to specific jobs](https://docs.alex.com/integrations/knowledge-base/job-scoping.md). Each row shows its current scope — **Global** means it's answerable in every interview. Click **Apply** to save.

Unchecked files stop syncing and are excluded from Alex's answers. Their already-indexed content is kept, so re-enabling is instant.

### Filters

**Sync content updated in the last** limits both pages and files by how recently they were modified: `7 days`, `30 days`, `90 days`, `6 months`, `1 year`, or `All time` (the default).

> [!WARNING]
>
> Narrowing this window **removes** content that falls outside it on the next sync, rather than just holding it back. Widen it again and the content returns on a later run.

## Supported Files

| | |
| - | - |
| **File types** | `.pdf`, `.docx`, `.doc`, `.txt` |
| **Maximum size** | 25 MB per file |
| **Volume cap** | 5,000 documents per connection |

Anything else in the library — spreadsheets, images, media, larger files — is skipped. Skipped files don't cause the sync to fail; they're simply not indexed.

> [!TIP]
>
> Scanned PDFs with no text layer are still read: Alex falls back to optical character recognition when a PDF has no extractable text.

## Sync Behavior

* Alex checks the connection **every 15 minutes**. There's no manual sync button.
* The first run is a full crawl; later runs pick up only what changed.
* Pages and files deleted in SharePoint are removed from Alex. If a selected site or library is unreachable during a run, Alex skips deletion processing that run rather than risk clearing your content.
* Saving your selection makes the next run a full re-crawl.

## Pausing and Reconnecting

* **Disable** pauses syncing and retrieval while preserving the indexed content, so **Enable** takes effect immediately.
* **Reconnect** re-runs authorization when the grant has been revoked in Microsoft 365.

To remove the connection and delete its synced content entirely, contact Alex support.

## Troubleshooting

> **The authorized Microsoft account has no SharePoint sites**
>
> The account you signed in with can't see any sites on the tenant. Sign in with an account that can browse SharePoint normally, and check that SharePoint is licensed for it.

> **Authorization was declined in SharePoint**
>
> Consent was cancelled, or your tenant requires administrator approval for new applications. Ask your Microsoft administrator to grant admin consent for Alex, then click **Connect** again.

> **Reconnection must use the same Microsoft tenant**
>
> Alex pins the connection to the tenant it was created against. Authorize with an account on the original tenant. Existing synced content is untouched.

> **A site I need isn't in the list**
>
> Use the **Add a site by URL** field with the site's full address. If it still doesn't resolve, confirm the authorizing account can open that site in a browser.

> **Some files in a library never sync**
>
> Check the file type and size against the table above — only `.pdf`, `.docx`, `.doc`, and `.txt` under 25 MB are indexed. Also check the freshness window, which applies to files as well as pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.