OpenClaw operations guide

Set up your first OpenClaw app in Microsoft Teams

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 · Published

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 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.

{
  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 before restarting it.

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 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

Next steps

Record the first private Teams reply

The OpenClaw Complete Setup Pack ($14.95) 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