Skip to main content
Install the plugin, register the bot and Teams app, point Teams at a reachable endpoint, and verify the result.

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:
Use the bare package to follow the current official release tag. Pin an exact version only when you need a reproducible install. Local checkout (running from a git repo):
Details: Plugins

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.
2. Start a tunnel (Teams cannot reach localhost) Install and authenticate the devtunnel CLI if needed (getting started guide).
--allow-anonymous is required because Teams cannot authenticate with devtunnels. Each incoming bot request is still validated by the Teams SDK.
Alternatives: ngrok http 3978 or tailscale funnel 3978 (URLs may change each session). 3. Create the app
This creates an Entra ID (Azure AD) application, generates a client secret, builds and uploads a Teams app manifest (with icons), and registers a Teams-managed bot (no Azure subscription needed). The output includes 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:
Or use environment variables directly: 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:
6. Verify everything works
Runs diagnostics across bot registration, AAD app config, manifest validity, and SSO setup. For production, consider federated authentication (certificate or managed identity) instead of client secrets.
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 reach localhost. Use a persistent dev tunnel so the URL stays stable across sessions:
Alternatives: 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:
Checks bot registration, AAD app, manifest, and SSO configuration in one pass. Send a test message:
  1. Install the Teams app (install link from teams app get <id> --install-link).
  2. Find the bot in Teams and send a DM.
  3. Check gateway logs for incoming activity.