# Microsoft Teams — Pipedream Connect

> Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.

- API slug: `microsoft_teams` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Communication
- Website: https://teams.microsoft.com
- Managed OAuth scopes: `User.Read` · `email` · `offline_access` · `openid` · `profile` · `ChatMessage.Send` · `Channel.ReadBasic.All` · `ChannelMessage.Read.All` · `ChannelMessage.Send` · `Team.ReadBasic.All` · `Schedule.Read.All` · `Channel.Create` · `Chat.ReadWrite`
- This page (HTML): https://pipedream.com/apps/microsoft-teams
- Tools: 12 actions · 6 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_teams`

```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_teams",
      },
    },
  },
)

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

const { tools } = await mcp.listTools()

// e.g. run Create Channel:
const result = await mcp.callTool({
  name: "microsoft_teams-create-channel",
  arguments: {
    teamId: "Team",
    displayName: "Display Name",
  },
})
```

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

## API proxy

For a Microsoft Teams 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_teams-create-channel",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    microsoft_teams: { authProvisionId: "apn_xxxxxxx" },
    teamId: "Team",
    displayName: "Display Name",
  },
})
```

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_teams-create-channel` — Create Channel (Write)

Create a new channel in Microsoft Teams. See the docs here

Full schema: https://pipedream.com/apps/microsoft-teams/actions/create-channel.md

### `microsoft_teams-get-chat-message` — Get Chat Message (Read-only)

Get a specific message from a chat. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/get-chat-message.md

### `microsoft_teams-get-current-user` — Get Current User (Read-only)

Returns the authenticated Microsoft Teams user's ID, display name, email, and principal name via Microsoft Graph. Call this first when the user says 'my channels', 'my chats', or needs identity context. Use the returned id to identify the sender in Send Channel Message or Send Chat Message results…

Full schema: https://pipedream.com/apps/microsoft-teams/actions/get-current-user.md

### `microsoft_teams-list-channel-messages` — List Channel Messages (Read-only)

Lists messages in a Microsoft Teams channel. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-channel-messages.md

### `microsoft_teams-list-channels` — List Channels (Read-only)

Lists all channels in a Microsoft Team. See the docs here

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-channels.md

### `microsoft_teams-list-chats` — List Chats (Read-only)

Lists all chat conversations for the authenticated user. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-chats.md

### `microsoft_teams-list-messages-in-chat` — List Messages in Chat (Read-only)

Get the list of messages in a chat. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-messages-in-chat.md

### `microsoft_teams-list-shifts` — List Shifts (Read-only)

Get the list of shift instances for a team. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-shifts.md

### `microsoft_teams-list-teams` — List Teams (Read-only)

Lists all teams the authenticated user has joined. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/list-teams.md

### `microsoft_teams-search-messages` — Search Messages (Read-only)

Search for email or chat messages. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/search-messages.md

### `microsoft_teams-send-channel-message` — Send Channel Message (Write)

Send a message to a team's channel. Optionally include inline images via hostedContents. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/actions/send-channel-message.md

### `microsoft_teams-send-chat-message` — Send Chat Message (Write)

Send a message to a team's chat. Optionally include inline images via hostedContents. See the docs here

Full schema: https://pipedream.com/apps/microsoft-teams/actions/send-chat-message.md

## Triggers (6)

### `microsoft_teams-new-channel` — New Channel (Polling)

Emit new event when a new channel is created within a team. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-channel.md

### `microsoft_teams-new-channel-message` — New Channel Message (Polling)

Emit new event when a new message is posted in a channel. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-channel-message.md

### `microsoft_teams-new-chat` — New Chat (Polling)

Emit new event when a new chat is created. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-chat.md

### `microsoft_teams-new-chat-message` — New Chat Message (Polling)

Emit new event when a new message is received in a chat. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-chat-message.md

### `microsoft_teams-new-team` — New Team (Polling)

Emit new event when a new team is joined by the authenticated user. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-team.md

### `microsoft_teams-new-team-member` — New Team Member (Polling)

Emit new event when a new member is added to a team. See the documentation

Full schema: https://pipedream.com/apps/microsoft-teams/triggers/new-team-member.md

---

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