#Does the Microsoft Teams channel support multi-account config like Discord does?

1 messages · Page 1 of 1 (latest)

willow bison
#

For Discord I can use channels.discord.accounts and bind separate accounts to separate agents. I want the same pattern for Teams, e.g. multiple Teams bot/app registrations under one OpenClaw gateway:

But the current channels.msteams docs/schema look single-provider only: appId, appPassword, tenantId, webhook, etc., with no obvious accounts block.

Is there a supported channels.msteams.accounts shape, or is the recommended approach separate OpenClaw gateway instances / separate webhook paths for each Teams bot?

median coyoteBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

royal shadowBOT
#

I checked current docs/source: no, channels.msteams.accounts is not supported today.

Teams is currently a single-account / top-level config channel:

channels: {
  msteams: {
    appId,
    appPassword,
    tenantId,
    webhook: { port, path },
  }
}

The plugin resolves only the default account and the schema doesn’t define accounts / defaultAccount for msteams, so Discord-style:

#
channels: {
  msteams: {
    accounts: {
      work: { appId: "...", ... }
    }
  }
}

isn’t a supported shape.

For multiple Teams bot/app registrations, the practical approach right now is separate OpenClaw gateway instances, each with its own Teams config and webhook endpoint/port/path. Separate webhook paths under one gateway won’t be enough with the current plugin, because the runtime has one Teams credential set / token validator.

Docs:

willow bison
#

Okay and is there a way to have multiple channels at least under one gateway ?? where we can setup multiple agents?? or is it 1 gateway = 1 agent for MSTeams currently ?

royal shadowBOT
#

Yep — one Gateway can still run multiple agents for MSTeams.

The limitation is narrower:

  • 1 Gateway → multiple agents works
  • 1 Teams bot/app → multiple Teams channels / group chats / DMs works
  • ✅ You can route different Teams conversations/channels to different agents with bindings
  • 1 Gateway → multiple separate MSTeams bot/app registrations is not supported currently

So it’s not “1 gateway = 1 agent” for Teams. It’s more like: 1 gateway = 1 Teams bot account, but that bot can route conversations to many agents.

Example shape:

{
  agents: {
#
    list: [
      { id: "sales", workspace: "~/.openclaw/workspace-sales" },
      { id: "engineering", workspace: "~/.openclaw/workspace-eng" },
    ],
  },

  bindings: [
    {
      agentId: "sales",
      match: {
        channel: "msteams",
        peer: { kind: "channel", id: "19:sales-channel-id@thread.tacv2" },
      },
    },
    {
#
      agentId: "engineering",
      match: {
        channel: "msteams",
        peer: { kind: "channel", id: "19:eng-channel-id@thread.tacv2" },
      },
    },
  ],

  channels: {
    msteams: {
      enabled: true,
      appId: "...",
      appPassword: "...",
      tenantId: "...",
      webhook: { port: 3978, path: "/api/messages" },
#

      groupPolicy: "allowlist",
      teams: {
        "19:team-id@thread.tacv2": {
          channels: {
            "19:sales-channel-id@thread.tacv2": { requireMention: true },
            "19:eng-channel-id@thread.tacv2": { requireMention: true },
          },
        },
      },
    },
  },
}

Key distinction: channels.msteams.teams controls which Teams/channels are allowed/configured; bindings controls which agent receives the message.