# Microsoft Entra ID — Pipedream Connect

> Safeguard your organization with a cloud identity and access management solution that connects employees, customers, and partners to their apps, devices, and data.

- API slug: `microsoft_entra_id` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Security
- Website: https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id
- Managed OAuth scopes: `openid` · `profile` · `email` · `offline_access` · `https://graph.microsoft.com/User.Read` · `https://graph.microsoft.com/User.ReadWrite` · `https://graph.microsoft.com/Directory.ReadWrite.All` · `https://graph.microsoft.com/Group.ReadWrite.All`
- This page (HTML): https://pipedream.com/apps/microsoft-entra-id
- Tools: 12 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: microsoft_entra_id`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "microsoft_entra_id",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Member To Group:
const result = await mcp.callTool({
  name: "microsoft_entra_id-add-member-to-group",
  arguments: {
    groupId: "Group",
    userId: "User",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Microsoft Entra ID endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://graph.microsoft.com/v1.0/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9ncmFwaC5taWNyb3NvZnQuY29tL3YxLjAvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "microsoft_entra_id-add-member-to-group",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    microsoft_entra_id: { authProvisionId: "apn_xxxxxxx" },
    groupId: "Group",
    userId: "User",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (12)

### `microsoft_entra_id-add-member-to-group` — Add Member To Group (Write)

Adds a member to a group Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/add-member-to-group.md

### `microsoft_entra_id-create-group` — Create Group (Write)

Creates a new group in Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/create-group.md

### `microsoft_entra_id-delete-group` — Delete Group (Write)

Deletes a group in Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/delete-group.md

### `microsoft_entra_id-get-manager` — Get Manager (Read-only)

Get the user's manager information. Returns the user or organizational contact assigned as the user's manager. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/get-manager.md

### `microsoft_entra_id-get-ms365-groups` — Get MS365 Groups (Read-only)

Get the user's Microsoft 365 groups (unified groups). Returns groups the user is a direct member of. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/get-ms365-groups.md

### `microsoft_entra_id-get-organization-groups` — Get Organization Groups (Read-only)

List all groups in the organization (excluding dynamic distribution groups). See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/get-organization-groups.md

### `microsoft_entra_id-get-organization-users` — Get Organization Users (Read-only)

List all users in the organization. By default returns only enabled accounts. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/get-organization-users.md

### `microsoft_entra_id-get-profile` — Get Profile (Read-only)

Get the user's profile information. Returns the signed-in user's profile by default. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/get-profile.md

### `microsoft_entra_id-remove-member-from-group` — Remove Member From Group (Write)

Removes a member from a group Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/remove-member-from-group.md

### `microsoft_entra_id-search-groups` — Search Groups (Read-only)

Searches for groups by name or description. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/search-groups.md

### `microsoft_entra_id-update-group` — Update Group (Write)

Updates an existing group in Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/update-group.md

### `microsoft_entra_id-update-user` — Update User (Write)

Updates an existing user in Microsoft Entra ID. See the documentation

Full schema: https://pipedream.com/apps/microsoft-entra-id/actions/update-user.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
