M365 Agent icon

M365 Agent

Send messages, cards, thread replies, and invoke responses through Microsoft 365 Agents (Teams / Copilot / WebChat).

Actions28

Adaptive Card → Send

AI-generated

Summary

Send an Adaptive Card to a Microsoft 365 Agent conversation with resolved content and conversation routing.

Inputs

  • authKind — Authentication kind: classicBot uses Azure Bot Service + Entra App Registration; agent365 uses Entra Agent Identity (Agent Blueprint). Default: classicBot.
  • conversationSource — Conversation routing info source. envelope: uses current item's conversationReference (replies/updates/deletes). manual: requires explicit serviceUrl, conversationId, channelId. Default: envelope.
  • serviceUrl (required) — Bot Connector service URL for the target channel (e.g. https://smba.trafficmanager.net/emea/). Required when conversationSource is manual.
  • conversationId (required) — Conversation ID. For Teams channels format: 19:xxx@thread.tacv2. Required when conversationSource is manual.
  • channelId — Azure Bot Service channel the conversation belongs to. Options: directline, emulator, msteamscopilot, msteams, webchat. Default: msteams. Shown when conversationSource is manual.
  • activityId — Activity ID required only for Reply/Update/Delete against a specific activity. Leave empty for proactive sends.
  • cardTemplate (required) — Adaptive Card JSON with ${field} placeholders. Author at https://adaptivecards.microsoft.com/designer. Default includes a TextBlock with ${title}.
  • bindingData — Object used to expand ${field} placeholders. Defaults to the full item ({{ $json }}).
  • options — Additional card and activity options. Contains fallbackText (string, shown when card cannot render) and rawActivityOverride (string, replaces constructed Activity body with raw JSON; must parse to object).
  • identityMode — Only shown when authKind is agent365. autonomous: Agent acts as its Blueprint app identity (default). agentUser: Agent acts as its own M365 user (requires sidecar transport and separate license).
  • userSelectorMode — Only shown when authKind is agent365 and identityMode is agentUser. byUpn: select by user principal name (default). byObjectId: select by Azure AD object ID.
  • agentUsername — UPN of the agentic user. Shown when authKind=agent365, identityMode=agentUser, and userSelectorMode=byUpn. Defaults to credential's Default Agent Username.
  • agentUserId — Object ID of the agentic user. Shown when authKind=agent365, identityMode=agentUser, and userSelectorMode=byObjectId.
  • agentUserNotice — Notice: Agent User Account mode uses the agent's own M365 user and requires a separate license (E5 + Teams Enterprise + Agent 365) on the agentic user account.

Output shape

The sent activity bundle returned by the dispatch function, containing the dispatched Adaptive Card activity response from the bot connector.

Constructed via async function execute(itemIndex, authKind, credentials, bundles). Conversation routing and card content are resolved before outbound dispatch through the appropriate auth backend (classicBot or agent365).

Links

Discussion