Bundled plugin
Microsoft Teams ships as a bundled plugin in current OpenClaw releases; no separate install is required in the normal packaged build. On an older build or a custom install that excludes bundled Teams, install the npm package directly:Quick setup
@microsoft/teams.cli handles bot registration, manifest creation, and credential generation in one command.
1. Install and log in
The Teams CLI is currently in preview. Commands and flags may change between releases.
--allow-anonymous is required because Teams cannot authenticate with devtunnels. Each incoming bot request is still validated by the Teams SDK.ngrok http 3978 or tailscale funnel 3978 (URLs may change each session).
3. Create the app
CLIENT_ID, CLIENT_SECRET, TENANT_ID, and a Teams App ID; it also offers to install the app in Teams directly.
4. Configure OpenClaw using the credentials from the output:
MSTEAMS_APP_ID, MSTEAMS_APP_PASSWORD, MSTEAMS_TENANT_ID.
5. Install the app in Teams
teams app create prompts you to install the app; select “Install in Teams”. To get the install link later:
Group chats are blocked by default (
channels.msteams.groupPolicy: "allowlist"). To allow group replies, set channels.msteams.groupAllowFrom, or use groupPolicy: "open" to allow any member (mention-gated).Goals
- Talk to OpenClaw via Teams DMs, group chats, or channels.
- Keep routing deterministic: replies always go back to the channel they arrived on.
- Default to safe channel behavior (mentions required unless configured otherwise).
Local development (tunneling)
Teams cannot reachlocalhost. Use a persistent dev tunnel so the URL stays stable across sessions:
ngrok http 3978 or tailscale funnel 3978 (URLs may change each session).
If the tunnel URL changes, update the endpoint:
Testing the bot
Run diagnostics:- Install the Teams app (install link from
teams app get <id> --install-link). - Find the bot in Teams and send a DM.
- Check gateway logs for incoming activity.