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

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Microsoft*.

> [!NOTE]
>
> Nango has a [Nango-managed OAuth app](https://nango.dev/docs/guides/auth/auth-guide.md#nango-managed-oauth-apps) you can use in development and production. Select it when you create the integration.

**2. 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.

**3. 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](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] 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] 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);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

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

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To use your own OAuth app instead of the Nango-managed one, follow the setup guide linked below.

## 📚 Microsoft Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Microsoft OAuth app](https://nango.dev/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 & tools for Microsoft

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

### Others

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

***


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