openclaw - 💡(How to fix) Fix [Feature]: Support multiple Microsoft Teams bot accounts in one gateway [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72876Fetched 2026-04-28 06:31:03
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Allow the Microsoft Teams channel to define multiple bot/app accounts, similar to Discord accounts, so one OpenClaw gateway can route different Teams apps to different agents.

Root Cause

Allow the Microsoft Teams channel to define multiple bot/app accounts, similar to Discord accounts, so one OpenClaw gateway can route different Teams apps to different agents.

Code Example

channels: {
  msteams: {
    enabled: true,
    accounts: {
      forge: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/forge" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      },
      boardkeeper: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/boardkeeper" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      }
    }
  }
}


### Alternatives considered


**Alternatives considered**
RAW_BUFFERClick to expand / collapse

Summary

Allow the Microsoft Teams channel to define multiple bot/app accounts, similar to Discord accounts, so one OpenClaw gateway can route different Teams apps to different agents.

Problem to solve

The current Microsoft Teams channel appears to support only one top-level channels.msteams config. This makes it hard to run multiple Teams-facing agents from one OpenClaw gateway.

Discord supports multiple accounts and bindings, for example separate bot accounts for Forge, Boardkeeper, CRM, etc. I would like the same pattern for Teams:

  • main <- msteams accountId=forge
  • boardkeeper <- msteams accountId=boardkeeper

Without multi-account Teams support, each Teams bot/app may require a separate gateway instance, webhook port, reverse proxy path, and deployment lifecycle, even when all agents already live in the same OpenClaw gateway.

Proposed solution

Add first-class multi-account support to the Microsoft Teams channel, mirroring the existing Discord account model.

Desired config shape could be something like:

channels: {
  msteams: {
    enabled: true,
    accounts: {
      forge: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/forge" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      },
      boardkeeper: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/boardkeeper" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      }
    }
  }
}


### Alternatives considered


**Alternatives considered**
```md
Run one OpenClaw gateway instance per Teams bot/app.

This works in theory, but it is heavier operationally: each Teams-facing agent needs its own gateway process, webhook port/path, reverse proxy rule, service config, health checks, secrets, and deployment lifecycle.

Use one Teams bot/app as a shared hub and route by conversation.

This is simpler at the infrastructure layer, but weaker when each agent should appear as a distinct Teams app/bot identity. It also makes permissions, install flow, branding, and deterministic agent routing less clear.

Manually swap the single `channels.msteams` config between apps.

This is only useful for testing. It cannot support multiple live Teams agents at the same time.


### Impact

Affected users/systems/channels:
- Teams users who want multiple OpenClaw agents exposed as separate Teams apps/bots
- Deployments that already use multiple Discord accounts/agents and want parity on Teams
- Single-gateway OpenClaw deployments with several agent personas

Severity:
- Blocks the intended Teams hub workflow when multiple agents need separate Teams identities.

Frequency:
- Always, for any deployment that needs more than one Teams bot/app connected to one gateway.

Consequence:
- Requires extra gateway instances or config swapping.
- Adds reverse proxy, service, port, secret, and deployment overhead.
- Makes Teams less ergonomic than Discord for multi-agent OpenClaw setups.


### Evidence/examples

Current Discord setup supports multiple accounts and bindings:

```text
main <- discord accountId=forge
boardkeeper <- discord accountId=boardkeeper
crm <- discord accountId=crm
radar <- discord accountId=radar


### Additional information

This should remain backward-compatible with the current single-account Teams config.

A migration path could treat existing `channels.msteams.appId/appPassword/tenantId/webhook` as the implicit `default` account, while allowing new deployments to opt into `channels.msteams.accounts`.

extent analysis

TL;DR

To support multiple Microsoft Teams bot/app accounts, add first-class multi-account support to the Microsoft Teams channel configuration.

Guidance

  • Update the channels.msteams configuration to include an accounts object with separate configurations for each Teams app/bot.
  • Define each account with its own appId, appPassword, tenantId, webhook, dmPolicy, and allowFrom settings.
  • Ensure the new configuration is backward-compatible with the current single-account Teams config.
  • Consider implementing a migration path to treat existing channels.msteams settings as the implicit default account.

Example

channels: {
  msteams: {
    enabled: true,
    accounts: {
      forge: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/forge" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      },
      boardkeeper: {
        appId: "...",
        appPassword: "...",
        tenantId: "...",
        webhook: { port: 3978, path: "/api/messages/boardkeeper" },
        dmPolicy: "allowlist",
        allowFrom: ["<aad-object-id>"]
      }
    }
  }
}

Notes

The proposed solution requires changes to the Microsoft Teams channel configuration and may involve updates to the underlying infrastructure and deployment processes.

Recommendation

Apply the proposed workaround by adding multi-account support to the Microsoft Teams channel configuration, as it provides a more scalable and maintainable solution for supporting multiple Teams bot/app accounts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Support multiple Microsoft Teams bot accounts in one gateway [1 participants]