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

# Connect SharePoint

> Create a Microsoft Entra app, grant it read access, and enter its details in Data Sources to sync files from a SharePoint site.

> [!TIP]
>
> Configure the source at [**AI Training → Data Sources**](https://platform.open.cx/data-sources).

> [!WARNING]
>
> Microsoft grants these permissions across your whole tenant. OpenCX reads only the site and folder you enter, but the app itself can read other sites, so keep its secret private. Files in the synced location can appear in customer answers as soon as they sync.

## Set up the sync

**1. Register an app in Microsoft Entra**

In the [Microsoft Entra admin center](https://entra.microsoft.com), go to **App registrations → New registration**. Note the **Application (client) ID** and **Directory (tenant) ID** from the app's overview page.

**2. Grant read permissions**

Open **API permissions → Add a permission → Microsoft Graph → Application permissions**. Add `Sites.Read.All` and `Files.Read.All`, then click **Grant admin consent**. A Microsoft administrator has to do this step.

**3. Create a client secret**

Open **Certificates & secrets → New client secret** and copy the secret's **Value**. Microsoft shows it only once. Note its expiry date: syncs stop when the secret expires.

**4. Add the source in OpenCX**

Go to [**AI Training → Data Sources**](https://platform.open.cx/data-sources) and click **SharePoint**.

| Field | Example | Notes |
| - | - | - |
| **Site URL** | `https://contoso.sharepoint.com/sites/support` | The site's home address, or a sharing link to a file in the site. Other addresses are refused, so the wrong site is never synced. |
| **Folder (optional)** | `Customer FAQs/Public` | Relative to the top of a document library. Leave empty to sync the whole site. |
| **Directory (tenant) ID** | `00000000-0000-…` | From the app's overview page. |
| **Application (client) ID** | `00000000-0000-…` | From the app's overview page. |
| **Client secret** | | The secret's **Value**, not its ID. |
| **User email** | `someone@contoso.com` | The work email of any user in the same Microsoft tenant. |

**5. Start the sync**

Click **Connect**. OpenCX checks the credentials, the site and the folder, then starts the first sync. Large libraries take longer.

**6. Verify in AI Instructions**

Open [**AI Training → AI Instructions**](https://platform.open.cx/ai-instructions). Your files appear under **Imported from SharePoint**, each linked to its file in SharePoint.

## What gets synced

> [accordion] Files in document libraries
>
> PDF, Word, PowerPoint, Excel and Markdown files in every document library on the site, including subfolders. When you set a folder, each library is searched for that folder and libraries without it are skipped.

> [accordion] Visibility
>
> New files arrive as **public** knowledge, so the AI can use them right away. To keep a file or folder away from the AI, use the eye icon on an item or **Hide all from AI** on the folder. Your choice is kept on later syncs.

> [accordion] Updates and deletions
>
> Each sync picks up new and edited files. Files deleted in SharePoint, or moved out of the synced location, leave the index after the next sync.

## Limits

| | Value |
| - | - |
| **File types** | `.pdf`, `.docx`, `.pptx`, `.md`, `.xlsx` |
| **Sites per connection** | One |
| **Excel size** | 10 MB per workbook, 500,000 characters of text |
| **Not synced** | Site pages (`.aspx`), `.doc`, `.ppt`, `.xls`, hidden Excel sheets |

***

## Related Documentation

> [card] [SharePoint overview](https://docs.open.cx/knowledge/sources/sharepoint/overview.md)
>
> What this source does and doesn't.

> [card] [Troubleshooting](https://docs.open.cx/knowledge/sources/sharepoint/troubleshooting.md)
>
> Connection errors and missing files.

> [card] [Website crawler](https://docs.open.cx/knowledge/sources/website/overview.md)
>
> For content reachable at a public URL.

> [card] [Connect a knowledge source](https://docs.open.cx/knowledge/sources/overview.md)
>
> All sources.


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