> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/m/microsoft-sharepoint-domains.md).

# Microsoft Sharepoint Domains

This adapter reads one SharePoint list through Microsoft Graph and turns each row into a domain record.

## Use cases

* List the domain records that come from your SharePoint list.

```
Adapters = microsoft-sharepoint-domains
```

## Before you begin

### Network

| Source              | Destination               | Port | Protocol |
| ------------------- | ------------------------- | ---- | -------- |
| OctoXLabs connector | login.microsoftonline.com | 443  | HTTPS    |
| OctoXLabs connector | graph.microsoft.com       | 443  | HTTPS    |

### Required permissions

| Scope or role                                 | Permission | Needed for                                                      |
| --------------------------------------------- | ---------- | --------------------------------------------------------------- |
| Sites.Read.All (Microsoft Graph, application) | Read       | Reading the SharePoint site and list items                      |
| Files.Read.All (Microsoft Graph, application) | Read       | Listed in the frontend instructions for the SharePoint adapters |

The permission list comes from the frontend instructions of the SharePoint adapters.

## Create credentials in Microsoft Sharepoint Domains

{% stepper %}
{% step %}

### Register an application

Sign in to the Azure Portal as an administrator, open Azure Active Directory and select App registrations > New registration. Fill in the details and select Register. The Application (client) ID and Directory (tenant) ID are shown.
{% endstep %}

{% step %}

### Create a client secret

Select Certificates & Secrets > New client secret. Select Add and copy the generated secret value at once.
{% endstep %}

{% step %}

### Add API permissions

Select API Permissions > Add a permission > Microsoft Graph > Application permissions. Add Sites.Read.All and Files.Read.All.
{% endstep %}

{% step %}

### Grant admin consent

Select Grant admin consent.
{% endstep %}

{% step %}

### Find the list address

Your list URL has the form `https://SharepointDomain/FolderType/YourSite/Lists/ListName`. You need the domain, folder type, site address and list name from it.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
These SharePoint adapters read one SharePoint list. Each list row becomes one asset. You tell OctoXLabs which list column holds each field. Enter column names without spaces. Columns you do not map stay available as adapter specific data under their display names.
{% endhint %}

## Connection parameters

| Parameter                               | Required | Type    | Default | Description                                                                |
| --------------------------------------- | -------- | ------- | ------- | -------------------------------------------------------------------------- |
| Tenant ID (`tenant_id`)                 | Yes      | String  |         | Directory (tenant) ID.                                                     |
| Client ID (`client_id`)                 | Yes      | String  |         | Application (client) ID.                                                   |
| Client Secret (`client_secret`)         | Yes      | String  |         | Client secret value.                                                       |
| Sharepoint Domain (`sharepoint_domain`) | Yes      | String  |         | Host name of the site collection, for example `yourtenant.sharepoint.com`. |
| Folder Type (`folder_type`)             | Yes      | String  |         | Folder type of the site collection, for example `personal` or `marketing`. |
| Site Address (`site_address`)           | Yes      | String  |         | Server-relative path of the site, for example `your_site_com`.             |
| List Name (`list_name`)                 | Yes      | String  |         | Name of the list. It is the last part of the list URL.                     |
| SSL (`is_secure`)                       | No       | Boolean | True    | Use HTTPS for the token request.                                           |
| Timeout (`timeout`)                     | No       | Integer | 30      | Seconds to wait for API responses.                                         |
| Primary Key Field (`primary_key_field`) | Yes      | String  |         | List column that identifies each domain record.                            |
| Name Field (`name_field`)               | No       | String  |         | List column for the name.                                                  |
| Domain Field (`domain_field`)           | No       | String  |         | List column for the domain.                                                |
| Type Field (`type_field`)               | No       | String  |         | List column for the type.                                                  |
| Content Field (`content_field`)         | No       | String  |         | List column for the content.                                               |

## Troubleshooting

| Error message | Cause | Fix                                    |
| ------------- | ----- | -------------------------------------- |
| Not verified  |       | No adapter-specific error text in code |

## Change history
