> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Import files from SharePoint Online into Mammoth

> Connect Mammoth to SharePoint Online with Azure app credentials, browse a site's document library, import a file, and collect new files on a schedule.

The SharePoint connector imports files from **Microsoft SharePoint Online** document libraries into Mammoth as datasets. It signs in with Azure app credentials (Tenant ID, Client ID, Client Secret), so the connection belongs to an app, not to one person's account. Open it from **Data Library** > **New dataset** > **Connectors** and search for **SharePoint**. Project Admins create the connection; Project Editors can start datasets from a connection the project already has. Which connectors you can add depends on your plan.

## What you can bring in from SharePoint

Files in the site's document library, of these types: `.txt`, `.csv`, `.tsv`, `.psv`, `.xls`, `.xlsx`, `.xlsm`, `.xml`, `.json`, `.jsonl`, `.ndjson`, `.zip`, `.bz2`, `.gz`, `.tar`, `.7z`.

## Before you connect SharePoint

You need an **Azure Active Directory app** with Microsoft Graph access to the SharePoint site. A Microsoft 365 admin does this once.

### Register the Azure AD app for SharePoint

1. Go to [Azure Portal](https://portal.azure.com) → **Azure Active Directory → App registrations**.
2. Click **New registration**, name it (for example `Mammoth SharePoint`), and click **Register**.
3. Copy the **Application (client) ID**. This is your **Client ID**.
4. Copy the **Directory (tenant) ID**. This is your **Tenant ID**.
5. Go to **Certificates & secrets → New client secret**, add a description, set an expiry, and click **Add**.
6. Copy the secret **Value** at once; it won't be shown again. This is your **Client Secret**.
7. Go to **API permissions → Add a permission → Microsoft Graph → Application permissions**.
8. Add `Sites.Read.All`, or `Sites.Selected` for a tighter scope.
9. Click **Grant admin consent**.

## Connect SharePoint to Mammoth

These steps follow the shared flow in [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/).

1. Go to the **Data Library** and click **New dataset**.
2. Choose **Connectors**.
3. Search for **SharePoint** and click its tile. The connector workspace opens with the **Chat** showing.
4. In the **Chat**, Mammoth shows a card that asks for the connection details. Fill in all four fields below.
5. Click **Connect**. There's no sign-in step, because the connector uses the app credentials. If the check fails, the card shows the error.

| Field | What to enter | Example |
| --- | --- | --- |
| **Server URL** | Your SharePoint site URL | `https://mycompany.sharepoint.com/sites/Analytics` |
| **Tenant ID** | Azure AD Directory (tenant) ID | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| **Client ID** | Azure AD Application (client) ID | `yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` |
| **Client Secret** | The app secret value you created | |

## Open a SharePoint file and pick columns

Once connected, the workspace lists the document library's folders and files.

1. In **Tables**, browse the folders and click a file to see its rows. A spreadsheet opens to its tabs.
2. Tick the columns you want. They gather in **Your table**.
3. Click **Preview 100 rows** to check the result.

If a file can't open in the panel yet, ask the agent in the **Chat** to import it.

## Save a SharePoint file as a dataset

1. Click **Save as dataset**.
2. Enter a **Dataset name** and choose a folder under **Save in**.
3. Click **Save**. When the dataset is ready, click **Open dataset**.

## Bring in new SharePoint files on a schedule

Mammoth saves a file from this connector once and shows **Saved once. Scheduled refresh for files is coming.** A [Dataset Refresh](https://mammoth.io/docs/learn/automate/refresh-a-dataset/) automation can't re-read it. To bring in new files as they arrive:

1. Set up a **File Collection** automation that collects them into a folder. See [What you can automate](https://mammoth.io/docs/learn/automate/).
2. Set up a [Data Consolidation](https://mammoth.io/docs/learn/automate/consolidate/) automation that adds that folder's files to a dataset.

## Troubleshoot SharePoint connections

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Authentication fails | A value is copied wrong | Check **Server URL**, **Tenant ID**, **Client ID** and **Client Secret**. IDs aren't case-sensitive but must be complete. |
| Authentication fails | Admin consent is missing | Grant admin consent for the API permissions |
| Authentication stops working later | The client secret expired | Generate a new secret in Azure Portal and update the connection in Mammoth |
| Permission denied on files | The Graph permission is missing | Grant `Sites.Read.All` (or `Sites.Selected` with the right site) with admin consent |

## Related

- [OneDrive](https://mammoth.io/docs/learn/get-data-in/connectors/onedrive/): import files from one user's OneDrive with the same kind of app.
- [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/): the shared connector workspace steps.
- [Manage saved connections](https://mammoth.io/docs/learn/get-data-in/connections/): update the connection when a secret expires.
- [What you can automate](https://mammoth.io/docs/learn/automate/): set up a File Collection automation.
- [Combine incoming data](https://mammoth.io/docs/learn/automate/consolidate/): add collected files to one dataset.

---
Source: https://mammoth.io/docs/learn/get-data-in/connectors/sharepoint.md · Updated: 2026-11-08
