M365 Agent icon

M365 Agent

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

Actions28

Invoke Response → Respond

AI-generated

Summary

Respond to an M365 Agent invoke operation with configurable authentication, response shape, status code, and body.

Inputs

  • authKind — Authentication method for the response. 'classicBot' uses an existing Azure Bot resource + Entra App Registration; 'agent365' uses an Agent Blueprint in Entra without needing an Azure Bot resource.
  • responseShape — Determines the shape of the invoke response. 'plain' provides a generic {status, body} envelope suitable for most invoke types. 'adaptiveCard' provides a full AdaptiveCardInvokeResponse, which is required by Action.Execute invokes.
  • statusCode — HTTP status code for the response. Defaults to 200 if not specified.
  • body — JSON payload for the response body. Defaults to an empty object '{}'. Content depends on the selected responseShape.
  • cardResponseType — Required when responseShape is 'adaptiveCard'. Selects how the Adaptive Card is delivered: 'application/vnd.microsoft.card.adaptive' to refresh the card, or 'application/vnd.microsoft.activity.message' to send a follow-up activity message.

Output shape

The operation returns an invoke response structured according to the selected responseShape. For 'plain', the return envelope contains status and body. For 'adaptiveCard', the return includes the Adaptive Card payload formatted per the chosen cardResponseType. Authentication is handled via the selected authKind, which governs token acquisition and validation through the node's backend routers.

The node's execute function (respond.operation.js) accepts a context object (ctx) providing item bundles and runtime state, but the specific runtime behavior (inputs consumed, side effects, return shape) is defined by the declared properties. If properties and source conflict, the source takes precedence; here the source provides only the function signature, so property declarations govern the described behavior.

Links

Discussion