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

# SharePoint

> Import a CSV or Excel file from a SharePoint document library.

The SharePoint connector downloads a `.csv` or `.xlsx` file from the site's **Documents** library and imports it as a dataset. Excel imports use the first worksheet.

## Before you start

Ask your Microsoft 365 administrator for an Entra application with a client ID and client secret, the tenant ID, and access to the required SharePoint site. Know the file's path relative to the Documents library.

The connector uses application authentication with Microsoft Graph's `https://graph.microsoft.com/.default` token scope. This uses permissions already granted to the application; `.default` does not itself mean read-only or access to a single site.

For a site-limited setup, ask your administrator to assess `Sites.Selected` with an explicit read grant on the target site and validate the connector's site lookup, library listing, and file download. Broader application permissions such as `Sites.Read.All` have a wider reach and should be a deliberate administrator decision. See [Microsoft's selected permissions model](https://learn.microsoft.com/en-us/graph/permissions-selected-overview).

## Set up and import

1. Open **Connections → New connection** and select **Sharepoint**.
2. Enter the Tenant ID and Site name. For a named site, use a value such as `example.sharepoint.com/sites/Finance`.
3. Create or select a client ID and client secret credential, then save the connection.
4. Configure an import with the file path within Documents, such as `Exports/monthly_sales.csv`.
5. Run the import and inspect the output dataset.

Use a site path for the connection and a library-relative file path for the import. A browser sharing link is not the same as the import file path.

## Limits to account for

The built-in file import selects the library named **Documents**. It does not provide an arbitrary library selector in this path. Confirm the library name, especially if the site uses a different language or custom libraries. Ask support about a custom integration if the file is elsewhere.

For Excel, move the intended table to the first worksheet or export it as CSV. This connector is for tabular file imports; do not assume it will extract tables from PDFs or Word documents.

## Troubleshooting

| Failure                     | Check                                                                   |
| --------------------------- | ----------------------------------------------------------------------- |
| Cannot obtain a token       | Tenant ID, client ID, secret validity, and administrator consent.       |
| Cannot retrieve the site    | Site path and application access to that site.                          |
| Cannot list libraries       | Graph application permissions and any selected-site grant.              |
| Documents library not found | The site must expose the expected Documents library for this connector. |
| File cannot be downloaded   | Library-relative path, letter case, and file access.                    |
| Wrong Excel data            | The intended data must be on the first sheet.                           |

Rerun the import to refresh the dataset. To disconnect, disable the connection and have an administrator revoke the provider grant or credential. Imported data remains in Dawn.
