# SharePoint

![Image 1 of 1](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776040330125.png)
Microsoft SharePoint is a web-based platform used for sharing files and information. The SharePoint integration will allow you to connect one or many OneDrive folders with Relyance.

In order to connect Sharepoint to any external application the user will need one of the following three (3) roles:

- Global Administrator
- Application Administrator
- Cloud Administrator

Ideally, we would want the Global Administrator to authorize the integration but the other two roles should work as well (though they cannot consent on behalf of the organization).

Relyance AI provides two (2) options to integrate with a tenant’s SharePoint account.

1. [The first option uses an OAuth2 flow for OneDrive inside SharePoint (personal SharePoint sites).](#h_01G1S16SMFR0A5GF5NX47DKXTG)
2. [The second option uses OAuth2 flow for Sites in SharePoint.](#h_01G523RJ44A5HRD9NA6PC928FE)

### Which method to choose

Three, and they differ in what they can see:

| Method | Fields | Scans |
| --- | --- | --- |
| **OAuth2 / App Token** | Folder Path | a folder in the **signing-in user's own** drive (OneDrive inside SharePoint) |
| **Site OAuth2 / App Token** | Folder Path, Site Name, Drive Name | one document library on one site |
| **All Sites OAuth2 / App Token** | none | every site the signing-in user can reach |

All three authorise **as the person who completes the browser sign-in**, using the
delegated Microsoft Graph scopes `Files.Read.All`, `Sites.Read.All` and
`offline_access` — so two consequences are worth planning for:

- **Scope is that user's scope.** "All Sites" means every site *they* can open, not
  every site in the tenant. Connect as an account whose access matches what you
  intend to scan, and expect a site nobody authorised to be invisible rather than
  reported as an error.
- **The connection needs re-authorising eventually.** `offline_access` means a
  refresh token, and Entra ID invalidates those on a password change, a revoked
  consent, or a conditional-access policy change. A connection that worked for
  weeks and then stops usually needs the same person to sign in again.

`Sites.Read.All` normally requires **admin consent** in Entra ID. If the sign-in
ends on a "needs admin approval" screen, an administrator has to grant it for the
tenant once.

#### Folder Path is checked against the user's own drive

For **OAuth2 / App Token**, Relyance validates the path against
`/me/drive` — the signing-in user's drive. A path that exists on a *site* rather
than in their own drive fails validation with "Couldn't get information for the
provided 'Folder Path'". That is the signal to use **Site OAuth2 / App Token**
with the Site Name and Drive Name instead, not to keep editing the path.

#### **Option 1 - Create an OAuth2 flow for OneDrive inside SharePoint (personal SharePoint sites)**

---

Through this option you can scan personal Sharepoint sites (which refers to OneDrive inside SharePoint). This integration requires an account with the necessary permissions and a **Folder ID.**

#### **In SharePoint:**

1. Login to your SharePoint account (personal SharePoint site)
2. Identify the **Folder ID** you wish to bring into Relyance AI For example if you had a root folder labeled '**Root_Folder**', you would use just the name in Relyance.  If you wish to use a subfolder, you will need to identify the full path. For example, '**Root_Folder/First_Sub_Folder'**.  Use '/' for the Root directory.

![Sharepoint-6.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038246541.png)

![Sharepoint-7.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776040331789.png)

#### **In the Relyance AI Application:**

1. Login to your Relyance account.
2. Navigate to the **Settings** (bottom-left corner).
3. Select **Integrations**.
4. Search and locate the **Microsoft** **Sharepoint** integration card and click on it.
5. Click on the **Add Connection** button on the top right
6. Provide a meaningful name for the integration and click on the **Add** button
7. In the **Overview** section, select the integration features you wish to enable for the integration, review the **Scope and Permission**, and **Endpoint** details and click on **Continue**. **Note:** For More details see [Integration Features](/docs/introduction-to-relyance-ai/integration-features/)
8. In the **Connection** section, provide the appropriate values and click on **Continue**,

- **Connection Name**: This property allows you to update the integration specified in Step 6. If you have multiple integrations for the same vendor, you may want to assign distinct names to each. This helps streamline filtering by **Discovery Source** across the **Inventory**, **Visual** **Maps**, **Assets**, and **Data Flow Analysis** pages.
- **Rescan Frequency**: This property allows you to configure how often Relyance executes scans against this Vendor connection.
- **Business Atlas Associations** (required): the business entities or products that newly discovered third parties, services and assets from this integration are attributed to. Choose at least one from the **Select Associations** dropdown — the wizard will not advance past this step without one. For more details, see [Business Atlas](/docs/other-settings/business-atlas-overview/).

1. In the Authentication section, provide the **folder path** and click on Continue
2. This *may* bring up a Microsoft login page. If so, login.
3. Once authenticated, follow any prompts to accept the connection.
 **Note:** This approach leverages Microsoft Graph APIs which are same as OneDrive. But Relyance can access only the folder(s) that is entered in the previous step.
4. If the Data Inspection check box is checked from step 7, In the Data Inspection section, provide the appropriate values and click on **Continue** **Minimum Confidence Level:** This property adjusts the sensitivity of the Data Inspection feature. Lower likelihoods (e.g., unlikely) offer more coverage but may produce false positives, while higher sensitivity (e.g., very likely) provides greater accuracy but less coverage. **Sampling Percentage**: This property adjusts the percentage of records using the table's row count (1000 records max) to return from a table.
5. Review the configuration summary from the Completion section and click on Finish.
6. Confirm the integration Status reflects Connected

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776040333325.png)

#### **Option 2 - OAuth2 flow for SharePoint Sites**

---

In order to integrate Sharepoint Sites with Relyance AI you will need an account with appropriate permissions, **Folder ID**, **Site Name**, and **Drive Name**. This connection type uses SharePoint directly.

#### **In SharePoint:**

1. Login to your SharePoint account.
2. Identify the **Site Name** you wish to connect to. This name will be found in the Site header and URL.
3. To identify the **Drive Name**, use the name of the Document library. By default this will be 'Documents'. In the screenshot below, the name is 'Example Library'.
4. Identify the **Folder ID** you wish to bring into Relyance AI. For example if you had a folder labeled 'First_Sub_Folder', you would use this in Relyance.  If you wish to use a subfolder, you will need to identify the full path. For example, 'First_Sub_Folder/Second_Sub_Folder'.  Use '/' for the Root directory.

![Sharepoint-8.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038260237.png)

![Sharepoint-9.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038272653.png)

![Sharepoint-11.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776040337293.png)

![Sharepoint-12.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038275981.png)

#### **In the Relyance AI Application:**

1. Login to your Relyance account.
2. Navigate to the **Settings** (bottom-left corner).
3. Select **Integrations**.
4. Search and locate the **Microsoft** **Sharepoint** integration card and click on it.
5. Click on the **Add Connection** button on the top right
6. Provide a meaningful name for the integration and click on the **Add** button
7. In the **Overview** section, select the integration features you wish to enable for the integration, review the **Scope and Permission**, and **Endpoint** details and click on **Continue**. **Note:** For More details see [Integration Features](/docs/introduction-to-relyance-ai/integration-features/)
8. In the **Connection** section, provide the appropriate values and click on **Continue**,

![Screenshot 2025-11-06 111127.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/40915080416141.png)

- **Connection Name**: This property allows you to update the integration specified in Step 6. If you have multiple integrations for the same vendor, you may want to assign distinct names to each. This helps streamline filtering by **Discovery Source** across the **Inventory**, **Visual** **Maps**, **Assets**, and **Data Flow Analysis** pages.
- **Rescan Frequency**: This property allows you to configure how often Relyance executes scans against this Vendor connection.
- **Business Atlas Associations** (required): the business entities or products that newly discovered third parties, services and assets from this integration are attributed to. Choose at least one from the **Select Associations** dropdown — the wizard will not advance past this step without one. For more details, see [Business Atlas](/docs/other-settings/business-atlas-overview/).

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038250253.png)

![Screenshot 2025-11-06 111139.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/40915080416909.png)

1. In the Authentication section, provide the **Folder Path, Site name and Drive name** and click on Authenticate Note: If the requirement is to scan all the SharePoint Sites please select the third tile (All Sites OAut2 / App Token) in the Authentication section

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34776038278285/43298690136077.png)

1. This *may* bring up a Microsoft login page. If so, login
2. Once authenticated, follow any prompts to accept the connection.  **Note:** This approach leverages Microsoft Graph APIs which are same as OneDrive. But Relyance can access only the folder(s) that is entered in the previous step.
3. If the Data Inspection check box is checked from step 7, In the Data Inspection section, provide the appropriate values and click on **Continue** **Minimum Confidence Level:** This property adjusts the sensitivity of the Data Inspection feature. Lower likelihoods (e.g., unlikely) offer more coverage but may produce false positives, while higher sensitivity (e.g., very likely) provides greater accuracy but less coverage. **Sampling Percentage**: This property adjusts the percentage of records using the table's row count (1000 records max) to return from a table.
4. Review the configuration summary from the Completion section and click on Finish.
5. Confirm the integration Status reflects Connected

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038259725.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038259853.png)

![Sharepoint-3.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776038258573.png)

![Sharepoint-2.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/34776040335117.png)

![Screenshot 2025-11-06 111211.png](https://assets.relyanceuat.xyz/images/docs/34776038278285/40915069470733.png)

![The connections list for SharePoint](https://assets.relyanceuat.xyz/images/docs/ui/sharepoint/08-connection-detail.png)

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

### OAuth (browser authorization)

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example sharepoint/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

### OAuth (browser authorization) — Site OAuth2 / App Token

The **OAuth (browser authorization) — Site OAuth2 / App Token** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example sharepoint/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

### OAuth (browser authorization) — All Sites OAuth2 / App Token

The **OAuth (browser authorization) — All Sites OAuth2 / App Token** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example sharepoint/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
