> ## 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.

# Microsoft Word (Client Credentials)

> Integrate your application with the Microsoft Word API via Microsoft Graph, using an app-only (client credentials) token

## 🚀 Quickstart

Connect to Microsoft Word with Nango and see data flow in 2 minutes.

<Steps>
  <Step id="create-integration" title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Microsoft Word (Client Credentials)*.
  </Step>

  <Step id="connect-microsoft-word" title="Connect Microsoft Word">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Connect*, then enter your **Tenant ID**, **Client ID**, and **Client Secret**. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step id="call-microsoft-graph" title="Call the Microsoft Word API">
    Let's make your first request to the Microsoft Graph API (list SharePoint sites). Replace the placeholders below with your [API 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?search=*" \
          -H "Authorization: Bearer <NANGO-API-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({ apiKey: '<NANGO-API-KEY>' });

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

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

    Or fetch credentials with 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 id="implement-nango" 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>

## 📚 Microsoft Word (Client Credentials) integration guides

Nango-maintained guides for common use cases.

* [How do I link my account?](/api-integrations/microsoft-word-oauth2-cc/connect)
  Connect using an Entra ID app with application permissions and client credentials

Official docs: [Microsoft Graph API for OneDrive & SharePoint](https://learn.microsoft.com/en-us/graph/api/resources/onedrive)

## 🧩 Pre-built syncs & actions for Microsoft Word (Client Credentials)

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

### Others

| Function name                    | Description                                                                    | Type                                           | Source code                                                                                                                                             |
| -------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `copy-word-document`             | Copy a Word document to a (possibly different) folder, optionally renaming it. | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/copy-word-document.ts)             |
| `create-folder`                  | Create a folder in a drive to organize Word documents.                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/create-folder.ts)                  |
| `create-sharing-link`            | Create a sharing link for a Word document.                                     | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/create-sharing-link.ts)            |
| `create-word-document`           | Upload a new Word document to a drive folder                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/create-word-document.ts)           |
| `delete-word-document`           | Delete a Word document.                                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/delete-word-document.ts)           |
| `get-site-drive`                 | Get the default document library (drive) for a SharePoint site.                | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/get-site-drive.ts)                 |
| `get-user-drive`                 | Get a user's personal OneDrive (drive).                                        | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/get-user-drive.ts)                 |
| `get-word-document-as-pdf`       | Download a Word document converted to PDF                                      | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/get-word-document-as-pdf.ts)       |
| `get-word-document-content`      | Download the raw .docx content of a Word document.                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/get-word-document-content.ts)      |
| `get-word-document`              | Retrieve metadata for a Word document (driveItem).                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/get-word-document.ts)              |
| `list-sites`                     | Search/list SharePoint sites accessible to the app                             | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/list-sites.ts)                     |
| `list-users`                     | List/search tenant users, to resolve a user id for personal OneDrive access.   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/list-users.ts)                     |
| `list-word-document-permissions` | List sharing permissions on a Word document.                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/list-word-document-permissions.ts) |
| `list-word-document-versions`    | List the version history of a Word document.                                   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/list-word-document-versions.ts)    |
| `list-word-documents`            | List/search .docx files within a drive                                         | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/list-word-documents.ts)            |
| `move-word-document`             | Move a Word document to a different folder.                                    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/move-word-document.ts)             |
| `update-word-document-content`   | Replace the content of an existing Word document.                              | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/update-word-document-content.ts)   |
| `update-word-document-metadata`  | Rename a Word document or update its description, without touching content.    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/actions/update-word-document-metadata.ts)  |
| `word-documents`                 | Sync .docx files within a drive                                                | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft-word-oauth2-cc/syncs/word-documents.ts)                   |

## API gotchas

* With an app-only token there's no signed-in user, so `/me/...` endpoints don't work. Target a specific user or site instead — `/v1.0/users/{id}/drive/...` or `/v1.0/sites/{site-id}/drive/...` — using an ID you resolved from `/v1.0/users` or `/v1.0/sites`.
* Application permissions (not delegated) must be granted and admin-consented in Entra ID — see the [connect guide](/api-integrations/microsoft-word-oauth2-cc/connect) for common permission names.

***
