# Set up your first OpenClaw app in Microsoft Teams

Canonical: https://cwyn.com/pages/openclaw-guide-first-microsoft-teams-app.html
Last updated: 2026-11-23T05:18:30-05:00

OpenClaw operations guide

Short answer. Register one Microsoft Teams app for OpenClaw, route its bot callback to your Gateway, and verify a private Teams reply. Start with a working Gateway, one test agent named main, and a Teams account allowed to install the app. Use the bundled Teams plugin in the current packaged build.

Last updated November 23, 2026 · Published November 19, 2026

By CWYN · Reviewed November 19, 2026 against OpenClaw 2026.11.5

## 1. Prepare the Teams callback

Start with a working Gateway, one test agent named `main`, and a Teams account allowed to install the app. Use the bundled Teams plugin in the current packaged build. Set up an HTTPS reverse proxy that forwards only `/api/messages` to the Gateway HTTP port. Keep the dashboard private. The [Teams setup reference](https://docs.openclaw.ai/channels/msteams/setup) describes the callback and the Teams CLI preview.

## 2. Register the app with the Teams CLI

Install the preview CLI, sign in, and check that the tenant shown by `teams status` is your test tenant. Replace `YOUR_BOT_HOST` with your HTTPS hostname before registering the app. Save the client ID, client secret, tenant ID, and Teams App ID privately. The Teams App ID is for Teams CLI commands. The client ID goes into OpenClaw.

```
npm install -g @microsoft/teams.cli@preview
teams login
teams status
teams app create --name "OpenClaw" --endpoint "https://YOUR_BOT_HOST/api/messages"
```

## 3. Connect the Teams bot to your agent

On the Gateway host, merge this into the active config. Append the binding to any existing bindings. Use the values from registration and keep the file private. This example keeps groups disabled and requires [approval for new DM senders](https://docs.openclaw.ai/channels/msteams/access-control).

```
{
  bindings: [{ agentId: "main", match: { channel: "msteams", accountId: "default" } }],
  channels: {
    msteams: {
      enabled: true,
      tenantId: "TENANT_ID",
      webhook: { path: "/api/messages" },
      dmPolicy: "pairing",
      groupPolicy: "disabled",
      accounts: { default: { appId: "CLIENT_ID", appPassword: "CLIENT_SECRET" } },
    },
  },
}
```

For an installed Gateway service, [validate the active config](https://docs.openclaw.ai/cli/config) before [restarting it](https://docs.openclaw.ai/cli/gateway/restart-and-supervision).

```
openclaw config validate
openclaw gateway restart
```

## 4. Install the app for personal use

Replace `TEAMS_APP_ID` with the Teams App ID. Run the Teams registration diagnostics and open the install link in your test tenant. Add the app for personal use.

```
teams app doctor TEAMS_APP_ID
teams app get TEAMS_APP_ID --install-link
```

## 5. Approve your DM and check the reply

Send a short DM from your test account. In the Gateway’s Control UI, open [Settings → Channels → DM access requests](https://docs.openclaw.ai/channels/pairing) and approve the request from that account. Then ask the bot to reply with `Teams test received` and look for the text in that DM. If the request never appears, check the registered callback and Gateway logs before changing sender policy.

[Get your free CWYN Score](https://cwyn.com/pages/score.html)

## Related guides

- [Set up your first OpenClaw Slack app in Socket Mode](https://cwyn.com/pages/openclaw-guide-first-slack-socket-mode-app.html)
- [Set up your first OpenClaw Google Chat app](https://cwyn.com/pages/openclaw-guide-first-google-chat-app.html)
- [Set up your first OpenClaw Discord bot](https://cwyn.com/pages/openclaw-guide-first-discord-bot.html)
- [Set up your first OpenClaw Feishu bot](https://cwyn.com/pages/openclaw-guide-first-feishu-bot.html)

## Next steps

- [All 135 OpenClaw guides](https://cwyn.com/guides/openclaw/)
- [OpenClaw setup walkthrough](https://cwyn.com/setup/openclaw/)
- [CWYN Score](https://cwyn.com/pages/score.html)
- [OpenClaw Complete Setup Pack ($14.95)](https://cwyn.com/pages/pack-openclaw-complete-setup-pack.html)

### Record the first private Teams reply

The [OpenClaw Complete Setup Pack ($14.95)](https://cwyn.com/pages/pack-openclaw-complete-setup-pack.html) is an optional paid kit with a Gateway checklist for recording the sender and agent you verified in Teams.
Kit details as of Nov 22, 2026

OpenClaw Complete Setup Pack $14.95

Start an OpenClaw workspace with editable instructions, local Gateway and tool presets, and checklists for pairing, memory, costs and rollback.
