openclaw/extensions/msteams/src
Brad Groux 568b0a22bb
fix(msteams): use General channel conversation ID as team key for Bot Framework compatibility (#41838)
* fix(msteams): use General channel conversation ID as team key for Bot Framework compatibility

Bot Framework sends `activity.channelData.team.id` as the General channel's
conversation ID (e.g. `19:abc@thread.tacv2`), not the Graph API group GUID
(e.g. `fa101332-cf00-431b-b0ea-f701a85fde81`). The startup resolver was
storing the Graph GUID as the team config key, so runtime matching always
failed and every channel message was silently dropped.

Fix: always call `listChannelsForTeam` during resolution to find the General
channel, then use its conversation ID as the stored `teamId`. When a specific
channel is also configured, reuse the same channel list rather than issuing a
second API call. Falls back to the Graph GUID if the General channel cannot
be found (renamed/deleted edge case).

Fixes #41390

* fix(msteams): handle listChannelsForTeam failure gracefully

* fix(msteams): trim General channel ID and guard against empty string

* fix: document MS Teams allowlist team-key fix (#41838) (thanks @BradGroux)

---------

Co-authored-by: bradgroux <bradgroux@users.noreply.github.com>
Co-authored-by: Onur <onur@textcortex.com>
2026-03-10 09:13:41 +01:00
..
attachments Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
monitor-handler fix(msteams): enforce sender allowlists with route allowlists 2026-03-09 05:52:19 +00:00
attachments.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
attachments.ts fix: msteams attachments + plugin prompt hints 2026-01-22 03:37:29 +00:00
channel.directory.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
channel.ts Teams: use scoped plugin SDK channel imports 2026-03-07 16:26:59 -08:00
conversation-store-fs.test.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
conversation-store-fs.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
conversation-store-memory.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
conversation-store.ts feat!: move msteams to plugin 2026-01-16 02:59:43 +00:00
directory-live.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
errors.test.ts fix(msteams): add proactive fallback for revoked turn context 2026-03-02 20:49:03 +00:00
errors.ts fix(msteams): add proactive fallback for revoked turn context 2026-03-02 20:49:03 +00:00
file-consent-helpers.test.ts chore: Run `pnpm format:fix`. 2026-01-31 21:13:13 +09:00
file-consent-helpers.ts fix: msteams attachments + plugin prompt hints 2026-01-22 03:37:29 +00:00
file-consent.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
file-lock.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
graph-chat.ts chore: Run `pnpm format:fix`. 2026-01-31 21:13:13 +09:00
graph-upload.ts Chore: trim stale TODOs and issue-template language (#22534) 2026-02-21 03:31:17 -05:00
graph-users.test.ts fix(msteams): improve graph user and token parsing 2026-02-22 11:29:31 +00:00
graph-users.ts fix(msteams): improve graph user and token parsing 2026-02-22 11:29:31 +00:00
graph.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
inbound.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
inbound.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
index.ts feat!: move msteams to plugin 2026-01-16 02:59:43 +00:00
media-helpers.test.ts fix(ci): stabilize Windows path handling in sandbox tests 2026-02-21 14:32:15 +01:00
media-helpers.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
mentions.test.ts fix: harden msteams mentions and fallback links (#15436) (thanks @hyojin) 2026-02-13 15:10:57 +01:00
mentions.ts fix: harden msteams mentions and fallback links (#15436) (thanks @hyojin) 2026-02-13 15:10:57 +01:00
messenger.test.ts refactor(extensions): reuse shared helper primitives 2026-03-07 10:41:05 +00:00
messenger.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
monitor-handler.file-consent.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
monitor-handler.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
monitor-types.ts TypeScript: add extensions to tsconfig and fix type errors (#12781) 2026-02-09 10:05:38 -08:00
monitor.lifecycle.test.ts CI: restore main detect-secrets scan (#38438) 2026-03-07 10:06:35 -08:00
monitor.test.ts msteams: harden webhook ingress timeouts 2026-03-02 20:34:05 +00:00
monitor.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
onboarding.ts refactor: share onboarding allowlist entry parsing 2026-03-08 00:05:24 +00:00
outbound.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
outbound.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
pending-uploads.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
policy.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
policy.ts refactor: share sender group policy evaluation 2026-03-07 23:27:51 +00:00
polls-store-memory.ts chore: Lint extensions folder. 2026-01-31 22:42:45 +09:00
polls-store.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.test.ts refactor(extensions): dedupe connector helper usage 2026-02-16 14:59:30 +00:00
polls.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
probe.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
probe.ts refactor: share trimmed list normalization in provider helpers 2026-03-07 23:27:51 +00:00
reply-dispatcher.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
resolve-allowlist.test.ts fix(msteams): use General channel conversation ID as team key for Bot Framework compatibility (#41838) 2026-03-10 09:13:41 +01:00
resolve-allowlist.ts fix(msteams): use General channel conversation ID as team key for Bot Framework compatibility (#41838) 2026-03-10 09:13:41 +01:00
revoked-context.test.ts refactor: harden msteams lifecycle and attachment flows 2026-03-02 21:19:23 +00:00
revoked-context.ts refactor: harden msteams lifecycle and attachment flows 2026-03-02 21:19:23 +00:00
runtime.ts refactor: harden browser runtime profile handling 2026-03-09 00:25:43 +00:00
sdk-types.ts feat!: move msteams to plugin 2026-01-16 02:59:43 +00:00
sdk.ts feat!: move msteams to plugin 2026-01-16 02:59:43 +00:00
secret-input.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
send-context.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
send.test.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
send.ts refactor(extensions): reuse shared helper primitives 2026-03-07 10:41:05 +00:00
sent-message-cache.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
sent-message-cache.ts MSTeams: dedupe sent-message cache storage (#22514) 2026-02-21 13:27:50 +05:30
storage.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
store-fs.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
test-runtime.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00
token-response.test.ts fix(msteams): improve graph user and token parsing 2026-02-22 11:29:31 +00:00
token-response.ts fix(msteams): improve graph user and token parsing 2026-02-22 11:29:31 +00:00
token.test.ts CI: restore main detect-secrets scan (#38438) 2026-03-07 10:06:35 -08:00
token.ts Plugins/msteams: migrate to scoped plugin-sdk imports 2026-03-04 02:35:12 -05:00