> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/reference-manual/v3.44.2/built-in-connectors/sharepoint.md).

# SharePoint

The Sharepoint connector for Elimity Insights fetches users, groups, and sites for a Sharepoint tenant so you can keep in control of your environment. Follow the instructions below to set up the connector for your environment.

## 1. Setting up a gateway

The Elimity Insights built-in connector for SharePoint requires at least full read access to the sites you want to scan; a more limited permission unfortunately just doesn't exist. Therefore we ask our customers to set up an additional layer of protection for their SharePoint credentials: each deployment of the Elimity Insights built-in connector for SharePoint should communicate with an on-prem instance of the Elimity Insights gateway for SharePoint. Only the on-prem gateway instance has direct access to the coarse-grained SharePoint tokens. Refer to [the documentation about our SharePoint gateway](https://docs.elimity.com/gateways-sharepoint/) for detailed setup instructions.

{% hint style="info" %}
This version of the connector is currently compatible with gateway versions matching `>=5.0.0`.
{% endhint %}

## 2. Creating a source in Elimity Insights

In Elimity Insights you can now create a new SharePoint source providing the following configuration options:

<table data-full-width="true"><thead><tr><th>Configuration option</th><th>Description</th></tr></thead><tbody><tr><td>Gateway URL</td><td>HTTP(S) URL of the Elimity Insights Sharepoint gateway you set up in step 1.</td></tr><tr><td>Target</td><td>HJSON array of objects describing which sites you want to import (use an empty array to target all sites in your tenant); refer to <a href="/pages/FUw4JSLwleljooXzxSEj">our documentation about target configuration</a> for more details.</td></tr><tr><td>Skip files</td><td>Indicates whether to skip scanning regular files and directories for each site.</td></tr><tr><td>Skip role assignments</td><td>Indicates whether you want to skip scanning role assignments for each file; make sure you granted the gateway <code>Sites.FullControl.All</code> permission when enabling this option.</td></tr><tr><td>Skip personal sites</td><td>Indicates whether to skip scanning personal sites.</td></tr><tr><td>Include regular files</td><td>Indicates whether to also scan regular files (not only directories).</td></tr><tr><td>List item page size</td><td>Maximum number of SharePoint list items to retrieve in a single page; we recommend a value of <code>5000</code>.</td></tr><tr><td>Role assignment chunk size</td><td>Maximum number of SharePoint list items to retrieve in a single page; we recommend a value of <code>100</code>.</td></tr><tr><td>File exclusion pattern</td><td>Optional <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob</a> pattern to exclude files based on their server-relative URLs; omit if you just want to import all files</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.elimity.com/reference-manual/v3.44.2/built-in-connectors/sharepoint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
