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

# SharePoint Online (v2)

> Integrate your application with the SharePoint Online (v2) API

## 🚀 Quickstart

Connect to SharePoint Online (v2) with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create an integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *SharePoint Online (v2)*.
  </Step>

  <Step title="Authorize SharePoint Online (v2)">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to SharePoint Online. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the SharePoint Online (v2) API">
    Let's make your first request to the SharePoint Online (Microsoft Graph) API (fetch a list of all available sites in an organization). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/v1.0/sites" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/v1.0/sites',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials dynamically via the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 SharePoint Online (v2) Integration Guides

Nango maintained guides for common use cases.

* [How to register your own SharePoint Online (v2) OAuth app](/api-integrations/sharepoint-online/how-to-register-your-own-sharepoint-online-api-oauth-app)\
  Register an OAuth app with SharePoint Online (v2) and obtain credentials to connect it to Nango

Official docs: [Microsoft Graph API documentation](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint)

## 🧩 Pre-built syncs & actions for SharePoint Online (v2)

Enable them in your dashboard. Extend and customize to fit your needs.

### Others

| Function name                  | Description                                                                                                   | Type                                           | Source code                                                                                                                                    |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `add-content-type-to-list`     | Associate a content type with a SharePoint list.                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/add-content-type-to-list.ts)     |
| `add-drive-item-permission`    | Invite users or groups to access a drive item.                                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/add-drive-item-permission.ts)    |
| `copy-drive-item`              | Copy a file or folder to another location in a site drive.                                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/copy-drive-item.ts)              |
| `create-content-type`          | Create a content type on a SharePoint site.                                                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-content-type.ts)          |
| `create-drive-folder`          | Create a folder in a SharePoint document library.                                                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-drive-folder.ts)          |
| `create-drive-upload-session`  | Start a large file upload session in a site drive.                                                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-drive-upload-session.ts)  |
| `create-list-column`           | Create a column on a SharePoint list.                                                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-list-column.ts)           |
| `create-list-item`             | Create an item in a SharePoint list.                                                                          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-list-item.ts)             |
| `create-list`                  | Create a SharePoint list on a site                                                                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-list.ts)                  |
| `create-sharing-link`          | Create a shareable link for a drive item.                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-sharing-link.ts)          |
| `create-site-column`           | Create a site-level column definition on a SharePoint site.                                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-site-column.ts)           |
| `create-site-page`             | Create a modern site page.                                                                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/create-site-page.ts)             |
| `delete-content-type`          | Delete a content type from a SharePoint site.                                                                 | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-content-type.ts)          |
| `delete-drive-item`            | Delete a file or folder from a site drive.                                                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-drive-item.ts)            |
| `delete-list-column`           | Delete a column from a SharePoint list.                                                                       | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-list-column.ts)           |
| `delete-list-item`             | Delete an item from a SharePoint list.                                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-list-item.ts)             |
| `delete-list`                  | Delete a SharePoint list.                                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-list.ts)                  |
| `delete-site-column`           | Delete a site-level column definition.                                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-site-column.ts)           |
| `delete-site-page`             | Delete a site page.                                                                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/delete-site-page.ts)             |
| `download-drive-item-content`  | Download the file content of a SharePoint drive item                                                          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/download-drive-item-content.ts)  |
| `get-content-type`             | Retrieve a single content type from a SharePoint site.                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-content-type.ts)             |
| `get-drive-item-thumbnail`     | Retrieve thumbnail URLs for a drive item.                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-drive-item-thumbnail.ts)     |
| `get-drive-item`               | Retrieve a file or folder from a site drive.                                                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-drive-item.ts)               |
| `get-drive`                    | Retrieve a site drive by ID.                                                                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-drive.ts)                    |
| `get-list-item`                | Retrieve a SharePoint list item by ID.                                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-list-item.ts)                |
| `get-list`                     | Retrieve a SharePoint list by ID.                                                                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-list.ts)                     |
| `get-site-page`                | Retrieve a site page by ID.                                                                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-site-page.ts)                |
| `get-site`                     | Retrieve a SharePoint site by ID or path.                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/get-site.ts)                     |
| `list-content-types`           | List content types defined on a SharePoint site.                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-content-types.ts)           |
| `list-drive-children`          | List items under a folder in a site drive.                                                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-drive-children.ts)          |
| `list-drive-item-permissions`  | List all permissions on a drive item.                                                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-drive-item-permissions.ts)  |
| `list-drive-item-versions`     | List the version history of a drive item.                                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-drive-item-versions.ts)     |
| `list-drives`                  | List document libraries on a site.                                                                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-drives.ts)                  |
| `list-list-columns`            | List columns on a SharePoint list.                                                                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-list-columns.ts)            |
| `list-list-content-types`      | List the content types associated with a SharePoint list.                                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-list-content-types.ts)      |
| `list-list-items`              | List items in a SharePoint list                                                                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-list-items.ts)              |
| `list-lists`                   | List SharePoint lists on a site.                                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-lists.ts)                   |
| `list-shared-sites`            | List SharePoint sites for user selection workflows.                                                           | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-shared-sites.ts)            |
| `list-site-columns`            | List site-level column definitions on a SharePoint site.                                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-site-columns.ts)            |
| `list-site-pages`              | List modern site pages on a site.                                                                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/list-site-pages.ts)              |
| `publish-site-page`            | Publish a site page.                                                                                          | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/publish-site-page.ts)            |
| `remove-drive-item-permission` | Remove a permission from a drive item.                                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/remove-drive-item-permission.ts) |
| `restore-drive-item-version`   | Restore a previous version of a drive item.                                                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/restore-drive-item-version.ts)   |
| `search-drive-items`           | Search for files and folders within a site drive.                                                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/search-drive-items.ts)           |
| `search-sites`                 | Search for sites by keyword.                                                                                  | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/search-sites.ts)                 |
| `update-drive-item-permission` | Update an existing permission on a drive item.                                                                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-drive-item-permission.ts) |
| `update-drive-item`            | Rename or move a file or folder in a site drive.                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-drive-item.ts)            |
| `update-list-column`           | Update a SharePoint list column.                                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-list-column.ts)           |
| `update-list-item`             | Update fields on a SharePoint list item.                                                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-list-item.ts)             |
| `update-list`                  | Update mutable list properties.                                                                               | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-list.ts)                  |
| `update-site-column`           | Update a site-level column definition.                                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-site-column.ts)           |
| `update-site-page`             | Update a modern site page draft.                                                                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/update-site-page.ts)             |
| `upload-drive-item`            | Upload small file content directly to a site drive (≤4 MB). For larger files use create-drive-upload-session. | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/actions/upload-drive-item.ts)            |
| `content-types`                | Sync content type definitions for configured sites.                                                           | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/content-types.ts)                  |
| `drive-item-versions`          | Sync version history for drive items in configured site drives                                                | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/drive-item-versions.ts)            |
| `drive-items`                  | Sync files and folders from selected site drives                                                              | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/drive-items.ts)                    |
| `drives`                       | Sync document libraries for selected sites                                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/drives.ts)                         |
| `list-columns`                 | Sync SharePoint list schemas.                                                                                 | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/list-columns.ts)                   |
| `list-items`                   | Sync items from selected SharePoint lists.                                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/list-items.ts)                     |
| `lists`                        | Sync SharePoint lists for selected sites.                                                                     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/lists.ts)                          |
| `permissions`                  | Sync permission grants on drive items for configured site drives.                                             | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/permissions.ts)                    |
| `shared-sites-selection`       | Sync selected files from chosen SharePoint shared sites.                                                      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/shared-sites-selection.ts)         |
| `site-columns`                 | Sync site-level column definitions for configured sites.                                                      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/site-columns.ts)                   |
| `site-pages`                   | Sync modern site pages for selected sites.                                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/site-pages.ts)                     |
| `sites`                        | Sync targeted SharePoint sites.                                                                               | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/sites.ts)                          |
| `subsites`                     | Sync subsites under selected parent sites.                                                                    | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/subsites.ts)                       |
| `user-files-selection`         | Sync selected user files from SharePoint.                                                                     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/user-files-selection.ts)           |
| `user-files`                   | Sync file metadata from user-accessible SharePoint files.                                                     | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/sharepoint-online/syncs/user-files.ts)                     |

<Info>
  Questions? Join us in the [Slack community](https://nango.dev/slack).
</Info>

***
