Who may talk to the Teams bot, which teams and channels it answers in, and where the IDs those rules use come from.

Config writes

By default, Microsoft Teams can write config updates triggered by /config set|unset (requires commands.config: true).

Disable with:

{
  channels: { msteams: { configWrites: false } },
}

Access control (DMs + groups)

Microsoft Teams has one account per channel configuration. Set policies directly under channels.msteams; an accounts map is not supported.

DM access

Group access

Example:

{
  channels: {
    msteams: {
      groupPolicy: "allowlist",
      groupAllowFrom: ["00000000-0000-0000-0000-000000000000", "accessGroup:core-team"],
    },
  },
}

Team + channel allowlist

With compatible core and Teams versions, verified official npm and ClawHub installations can use the existing read, search, reactions, list-pins, member-info, channel-info, and channel-list actions under these access rules. Agent reads from an installed plugin require trusted current Teams conversation and account context. Listing a team's channels requires access to the whole team; access to one channel does not grant that permission. Member lookups retain their standard-channel and current-requester restrictions. Subsequent Graph requests and results are rejected when the originating call or plugin loses authority.

Example:

{
  channels: {
    msteams: {
      groupPolicy: "allowlist",
      groupAllowFrom: ["00000000-0000-0000-0000-000000000000"],
      teams: {
        "19:team-id@thread.tacv2": {
          channels: {
            "19:channel-id@thread.tacv2": { requireMention: true },
          },
        },
      },
    },
  },
}

Mentions in bot-created threads

Set requireMentionInBotThreads: false to answer without an @mention in channel threads whose root message was sent by this bot. Set it to true to require a mention in those threads, including replies that would otherwise count as an implicit mention. Omit it to retain the existing mention behavior.

The setting resolves from channel to team to channels.msteams, independently of requireMention. Parent-channel posts and other people's threads retain their usual mention rules. Group-chat quotes are not channel threads, and sender and team/channel allowlists still apply.

{
  channels: {
    msteams: {
      requireMention: true,
      requireMentionInBotThreads: false,
    },
  },
}

Ownership uses accepted top-level channel posts recorded by the current bot, including proactive messages. Replies inside existing threads do not establish ownership. Tracking lasts up to 24 hours and is bounded; the newest 1,000 send markers survive restarts. Older or untracked roots retain the ordinary mention rules. Teams must grant ChannelMessage.Read.Group in the app manifest to deliver messages without an @mention; see RSC permissions.

Team and Channel IDs (Common Gotcha)

The groupId query parameter in Teams URLs is NOT the team ID used for configuration. Extract IDs from the URL path instead:

Team URL:

https://teams.microsoft.com/l/team/19%3ABk4j...%40thread.tacv2/conversations?groupId=...
                                    └────────────────────────────┘
                                    Team conversation ID (URL-decode this)

Channel URL:

https://teams.microsoft.com/l/channel/19%3A15bc...%40thread.tacv2/ChannelName?groupId=...
                                      └─────────────────────────┘
                                      Channel ID (URL-decode this)

For config:

Private channels

Bots have limited support in private channels:

Feature Standard channels Private channels
Bot installation Yes Limited
Real-time messages (webhook) Yes May not work
RSC permissions Yes May behave differently
@mentions Yes If bot is accessible
Graph API history Yes Yes (with permissions)

Workarounds if private channels do not work:

  1. Use standard channels for bot interactions.
  2. Use DMs; users can always message the bot directly.
  3. Use Graph API for historical access (requires ChannelMessage.Read.All).