Skip to content

[Bug]: MSTeams provider-prefixed explicit target IDs miss resolver gate #104381

Description

@VectorPeak

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Provider-prefixed Microsoft Teams explicit targets such as teams:user:<aad-guid> and msteams:user:<aad-guid> are normalized like user:<aad-guid>, but the MSTeams target-ID detector did not classify the prefixed forms as explicit IDs.

Steps to reproduce

  1. Exercise the MSTeams target-ID detector with an unprefixed explicit user target: user:40a1a0ed-4ff2-4164-a219-55518990c197.
  2. Exercise the same detector with provider-prefixed forms: teams:user:40a1a0ed-4ff2-4164-a219-55518990c197 and msteams:user:40a1a0ed-4ff2-4164-a219-55518990c197.
  3. Exercise the outbound resolver gate with maybeResolvePluginMessagingTarget({ requireIdLike: true }) and input teams:user:40a1a0ed-4ff2-4164-a219-55518990c197.

Expected behavior

Provider-prefixed explicit MSTeams user IDs should be classified consistently with their normalized user:<aad-guid> form, allowing the explicit-target resolver path to run.

Actual behavior

The detector only trimmed the raw input before checking known MSTeams ID formats, so the prefixed forms were not recognized as explicit IDs and could be stopped by the id-like resolver gate.

OpenClaw version

main branch before #104364

Operating system

Windows 11 local checkout; behavior is string parsing and not OS-specific.

Install method

Local repository checkout with targeted Vitest validation.

Model

NOT_ENOUGH_INFO

Provider / routing chain

MSTeams outbound target normalization and plugin target resolution.

Additional provider/model setup details

This is limited to MSTeams target parsing/resolution. No live Microsoft Graph or Teams credentials are required for the focused reproduction.

Logs

Before fix, focused regression expectation:
- user:<aad-guid> => true
- teams:user:<aad-guid> => false
- msteams:user:<aad-guid> => false

After fix in openclaw/openclaw#104364:
node scripts/run-vitest.mjs run extensions/msteams/src/resolve-allowlist.test.ts
Test Files  1 passed (1)
Tests       37 passed (37)

Screenshots, recordings, and evidence

Proposed fix and focused behavior proof: #104364

The added behavior-level test proves teams:user:<aad-guid> passes through maybeResolvePluginMessagingTarget({ requireIdLike: true }), calls the plugin resolver, and reaches it as normalized user:<aad-guid>. It also proves teams:user:John Smith remains outside the id-like gate.

Impact and severity

Affected: MSTeams users/operators who use provider-prefixed explicit targets.
Severity: Low to medium; explicit IDs can be classified inconsistently depending on whether the local provider prefix is present.
Frequency: Always for provider-prefixed explicit user IDs before the fix.
Consequence: Explicit target resolution paths that require id-like input can reject a prefixed target even though the normalized target is valid.

Additional information

This issue is intentionally narrow. It does not claim that directory lookup, approval authorization, or live Microsoft Graph behavior is broadly broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions