View as Markdown

Microsoft Entra ID Integration

Manage Microsoft Entra ID list users, get user, create user, list groups, list applications

The Microsoft Entra ID integration provides access to manage Microsoft Entra ID list users, get user, create user, list groups, list applications through the Integrate MCP server.

Installation

The Microsoft Entra ID integration is included with the SDK:

import { microsoftEntraIdIntegration } from "integrate-sdk/server";

Setup

1. Create a Microsoft Entra ID OAuth App

  1. Go to Azure Portal — App Registrations
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Microsoft Entra ID integration to your server configuration. The integration automatically reads MICROSOFT_ENTRA_ID_CLIENT_ID and MICROSOFT_ENTRA_ID_CLIENT_SECRET from your environment variables:

import { createMCPServer, microsoftEntraIdIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    microsoftEntraIdIntegration({
      scopes: ["User.ReadWrite.All", "Group.ReadWrite.All", "Application.ReadWrite.All", "Directory.Read.All", "AuditLog.Read.All", "offline_access"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

microsoftEntraIdIntegration({
  clientId: process.env.CUSTOM_MICROSOFT_ENTRA_ID_ID,
  clientSecret: process.env.CUSTOM_MICROSOFT_ENTRA_ID_SECRET,
      scopes: ["User.ReadWrite.All", "Group.ReadWrite.All", "Application.ReadWrite.All", "Directory.Read.All", "AuditLog.Read.All", "offline_access"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("microsoft_entra_id");
const result = await client.microsoft_entra_id.listUsers({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, microsoftEntraIdIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [microsoftEntraIdIntegration()],
});

Configuration Options

export interface MicrosoftEntraIdIntegrationConfig {
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • User.ReadWrite.All
  • Group.ReadWrite.All
  • Application.ReadWrite.All
  • Directory.Read.All
  • AuditLog.Read.All
  • offline_access

Tools

microsoft_entra_id_list_users

Entra id list users

export interface MicrosoftEntraIdListUsersParams { "$top"?: number;

microsoft_entra_id_get_user

Entra id get user

export interface MicrosoftEntraIdGetUserParams { user_id: string }

microsoft_entra_id_create_user

Entra id create user

export interface MicrosoftEntraIdCreateUserParams { user_json: string }

microsoft_entra_id_list_groups

Entra id list groups

export interface MicrosoftEntraIdListGroupsParams { "$top"?: number;

microsoft_entra_id_list_applications

Entra id list applications

export interface MicrosoftEntraIdListApplicationsParams { "$top"?: number;

microsoft_entra_id_list_audit_logs

Entra id list audit logs

export interface MicrosoftEntraIdListAuditLogsParams { "$top"?: number;

Notes

  • Category: Identity & Access
  • Authentication mode: OAuth