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

# Microsoft SharePoint integration

[Back to list of integrations](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md)

Use the Microsoft SharePoint integration to let agents manage lists, files, folders, and pages, and look up sites, through Microsoft Graph.

| Authentication | Actions | Workflow triggers |
| - | - | - |
| Azure AD (Service Principal), OAuth 2.0 App (User Delegated), OAuth 2.0 Client Credentials | [16](#supported-actions) | [8](#workflow-triggers) |

## Supported actions

Actions are Microsoft SharePoint operations that an agent runs as Action Tools during a conversation. You can also run them from an [Integration node](https://koreai.mintlify.site/agent-platform/workflows.md#integration-node) in a workflow.

| Group | Actions |
| - | - |
| Lists | [Create List](#create-list), [Create List Item](#create-list-item), [Update List Item](#update-list-item), [Find List Item](#find-list-item), [Delete List Item](#delete-list-item) |
| Files and folders | [Upload File](#upload-file), [Find File](#find-file), [Get Folder Contents](#get-folder-contents), [Create Folder](#create-folder), [Move File](#move-file), [Copy File or Folder (Within Site)](#copy-file-or-folder-within-site), [Copy File or Folder (Across Sites)](#copy-file-or-folder-across-sites) |
| Sites and pages | [Find Site](#find-site), [Get Site Information](#get-site-information), [Publish Page](#publish-page) |
| Advanced | [Custom API Call](#custom-api-call) |

## Workflow triggers

Triggers are Microsoft SharePoint events that start a workflow automatically. Select them as [app triggers](https://koreai.mintlify.site/agent-platform/workflows.md#app-triggers) when you configure a workflow.

| Trigger | Fires when |
| - | - |

## Set up the integration

**1. Register an Entra ID app**

Register an app in [Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app), create a client secret, and copy the **Application (client) ID** and **Directory (tenant) ID**. Add Microsoft Graph permissions (for example `Sites.ReadWrite.All` and `Files.ReadWrite.All`, plus `offline_access` for delegated access) as **Delegated** or **Application** permissions, grant admin consent, and for delegated access add the Artemis **Callback URL** as a **Web** redirect URI.

**2. Create the auth profile**

In **Integrations**, select **Microsoft SharePoint** > **Connect**. On **Project Auth Profiles**, select **New Profile** > **Integration Profile** > **Microsoft SharePoint** > **Continue**. Select an **Auth Type**, configure the fields, and select **Create Profile**. For delegated access, select **Authorize**.

> [tab] OAuth 2.0 App (User Delegated)
>
> Enter the Microsoft identity platform endpoints if Artemis doesn't pre-fill them (`https://login.microsoftonline.com/<tenant>/oauth2/v2.0/authorize` and `.../token`), the delegated **Scopes**, **Client ID**, and **Client Secret**.&#x20;
>
> **Usage Mode**: **Preconfigured** shares one authorization across users; **JIT** and **Preflight** ask each user to authorize, during or before the session. See [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles).

> [tab] Azure AD (Service Principal)
>
> Enter **Azure Tenant ID**, **Scopes** (`https://graph.microsoft.com/.default`), **Client ID**, and **Client Secret**. Keep **Resource** as `https://graph.microsoft.com`.

> [tab] OAuth 2.0 Client Credentials
>
> Keep **Authorize Using** as **Client Secret** and the pre-filled **Token URL** and **Scopes**. Enter **Client ID** and **Client Secret**.

**3. Create the action tool**

In **Tools**, select **New Tool** > **Action** > **Microsoft SharePoint** > **Continue**. Select the **Action** and **Auth Profile**, set parameter defaults (leave a value empty for the agent to supply at runtime), and select **Create Tool**. Then [assign the tool to an agent](https://koreai.mintlify.site/agent-platform/tools/actions.md#assign-an-action-to-an-agent).

## Action reference

### Lists

> [accordion] Create List
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `displayName` | string | List name. |
> | `description` | string | List description. |

> [accordion] Create List Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `listId` | enum | List. |
> | `listColumns` | object | Column values. |

> [accordion] Update List Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `listId` | enum | List. |
> | `listItemId` | enum | Item. |
> | `listColumns` | object | Column values. |

> [accordion] Find List Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `listId` | enum | List. |
> | `searchValue` | string | Item title. |

> [accordion] Delete List Item
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `listId` | enum | List. |
> | `listItemId` | enum | Item. |

### Files and folders

> [accordion] Upload File
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `file` | string | File or URL to upload. |
> | `parentFolder` | string | Folder path, for example `/docs/`. |
> | `fileName` | string | File name. |

> [accordion] Find File
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `findMethod` | enum | Search by name or by path. Default: `Search by Name`. |
> | `filePath` | string | Exact path from the library root. |
> | `searchQuery` | string | File name or keyword. |
> | `searchFolderId` | enum | Folder to search. Searches the whole library if empty. |

> [accordion] Get Folder Contents
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `folderId` | enum | Folder. |
> | `includeCustomFields` | boolean | Includes SharePoint metadata. Default: `False`. |
> | `top` | number | Maximum items. |
> | `select` | string | Comma-separated properties to return. |
> | `orderby` | string | Sort order. |

> [accordion] Create Folder
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `parentFolder` | string | Parent folder path, for example `/demo/`. |
> | `folderName` | string | Folder name. |

> [accordion] Move File
>
> Moves a file within the same library.
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `fileId` | enum | File. |
> | `destinationFolderId` | enum | Destination folder. |
> | `newName` | string | Optional new name. |

> [accordion] Copy File or Folder (Within Site)
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `itemId` | enum | Source file or folder. |
> | `destinationFolderId` | enum | Destination folder. |
> | `newName` | string | Optional new name. |
> | `conflictBehavior` | enum | Action when an item with the same name exists. Default: `Fail on conflict`. |

> [accordion] Copy File or Folder (Across Sites)
>
> Copies to another site in the same tenant.
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `driveId` | enum | Document library (drive). |
> | `itemId` | enum | Source file or folder. |
> | `destination_site_id` | enum | Destination site. |
> | `destination_drive_id` | enum | Destination library. |
> | `destination_folder_id` | enum | Destination folder. |
> | `new_name` | string | Optional new name. |
> | `conflict_behavior` | enum | Action on a name conflict. Default: `Fail on conflict`. |

### Sites and pages

> [accordion] Find Site
>
> | Parameter | Type | Description |
> | - | - | - |
> | `searchTerm` | string | Site name or keyword. |

> [accordion] Get Site Information
>
> Returns site metadata, such as ID, title, URL, and description.
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `select` | string | Comma-separated properties to return. |

> [accordion] Publish Page
>
> Publishes a page for all users.
>
> | Parameter | Type | Description |
> | - | - | - |
> | `siteId` | enum | Site. |
> | `pageId` | enum | Page. |

### Advanced

> [accordion] Custom API Call
>
> | Parameter | Type | Description |
> | - | - | - |
> | `url` | object | Endpoint URL. |
> | `method` | enum | HTTP method. |
> | `headers` | object | Additional request headers. Artemis injects the authorization header. |
> | `queryParams` | object | Query parameters. |
> | `body_type` | enum | Body type. Default: `None`. |
> | `body` | object | Request body. |
> | `response_is_binary` | boolean | Turn on for binary responses. Default: `False`. |
> | `failsafe` | boolean | Returns no error when the call fails. |
> | `timeout` | number | Timeout, in seconds. |
> | `followRedirects` | boolean | Follows HTTP redirects. Default: `False`. |

## Troubleshoot common issues

| Issue | Resolution |
| - | - |
| `AADSTS50011` redirect URI mismatch | Add the exact **Callback URL** as a **Web** redirect URI in the app registration. |
| `AADSTS65001` consent required | Grant admin consent for the API permissions, and then authorize again. |
| `403 Forbidden` | Add the missing Microsoft Graph permission for the action, and grant consent. |
| Site or library lists are empty | Confirm the account or app can access the site. For app-only access, grant `Sites.ReadWrite.All` or `Sites.Selected` with a site grant. |
| Copy or upload fails with a conflict | Change **conflictBehavior**, or set a new name. |

**Related articles:**

* [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles)
* [Action Tools](https://koreai.mintlify.site/agent-platform/tools/actions.md)
* [Microsoft Excel integration](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems/microsoft-excel)
* [SharePoint API in Microsoft Graph](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.