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

# Microsoft

> Integrate your application with the Microsoft API

## 🚀 Quickstart

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

<Steps>
  <Step 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*.
  </Step>

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

  <Step title="Call the Microsoft API">
    Let's make your first request to the Microsoft Graph API (fetch the current user's profile). Replace the placeholders below with your [Environment API key](/docs/reference/backend/http-api/api-keys), [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/me" \
          -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/me',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

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

    Or fetch credentials with the [Node SDK](/docs/reference/backend/backend-sdk/node#get-a-connection-with-credentials) or [API](/docs/reference/backend/http-api/connections/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](/docs/guides/primitives/auth) to integrate Nango in your app.

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

## 📚 Microsoft Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Microsoft OAuth app](/docs/api-integrations/microsoft/how-to-register-your-own-microsoft-api-oauth-app)\
  Register an OAuth app with Microsoft and obtain credentials to connect it to Nango

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

## 🧩 Pre-built syncs & actions for Microsoft

Explore Nango-provided actions in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type | Source code |
| - | - | - | - |
| `add-group-member` | Add a member (user, group, or service principal) to a group in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/add-group-member.ts) |
| `create-application` | Create a new application in Microsoft Entra ID | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/create-application.ts) |
| `create-group` | Create a group in Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/create-group.ts) |
| `create-service-principal` | Create a service principal in Microsoft Entra ID for an existing application. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/create-service-principal.ts) |
| `create-user` | Create a user in Microsoft Azure AD | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/create-user.ts) |
| `delete-application` | Delete or archive an application in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/delete-application.ts) |
| `delete-group` | Delete or archive a group in Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/delete-group.ts) |
| `delete-service-principal` | Delete a service principal in Microsoft Entra ID | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/delete-service-principal.ts) |
| `delete-user` | Delete or archive a user in Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/delete-user.ts) |
| `get-application` | Retrieve a single application from Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-application.ts) |
| `get-directory-role` | Retrieve a single directory role from Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-directory-role.ts) |
| `get-group` | Retrieve a single group from Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-group.ts) |
| `get-organization` | Retrieve a single organization from Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-organization.ts) |
| `get-service-principal` | Retrieve a single service principal from Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-service-principal.ts) |
| `get-user` | Retrieve a single user from Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/get-user.ts) |
| `list-applications` | List applications from Microsoft Graph API | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-applications.ts) |
| `list-devices` | List devices from Microsoft Graph | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-devices.ts) |
| `list-directory-role-members` | List all members (users and service principals) assigned to a directory role in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-directory-role-members.ts) |
| `list-directory-roles` | List directory roles from Microsoft Graph. Returns activated directory roles in the tenant. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-directory-roles.ts) |
| `list-group-members` | List all direct members of a group in Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-group-members.ts) |
| `list-groups` | List groups from Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-groups.ts) |
| `list-organizations` | List organizations from Microsoft Graph. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-organizations.ts) |
| `list-service-principals` | List service principals from Microsoft Graph | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-service-principals.ts) |
| `list-user-memberships` | List all groups, directory roles, and administrative units that a user is a member of in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-user-memberships.ts) |
| `list-users` | List users from Microsoft | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/list-users.ts) |
| `remove-group-member` | Remove a member from a group in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/remove-group-member.ts) |
| `update-application` | Update an application in Microsoft Entra | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/update-application.ts) |
| `update-group` | Update a group in Microsoft. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/update-group.ts) |
| `update-organization` | Update the properties of a Microsoft organization. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/update-organization.ts) |
| `update-service-principal` | Update a service principal in Microsoft Entra ID. | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/update-service-principal.ts) |
| `update-user` | Update a user in Microsoft Entra ID | [Action](/docs/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/actions/update-user.ts) |
| `applications` | Sync applications from Microsoft Graph | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/applications.ts) |
| `directory-roles` | Sync directory roles from Microsoft | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/directory-roles.ts) |
| `groups` | Sync groups from Microsoft Graph with incremental delta tracking | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/groups.ts) |
| `organizations` | Sync organizations from Microsoft | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/organizations.ts) |
| `service-principals` | Sync service principals from Microsoft Graph | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/service-principals.ts) |
| `users` | Sync users from Microsoft | [Sync](/docs/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/microsoft/syncs/users.ts) |

***


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