Adaptive card error

(ゾー)Zaw Htet Aung 25 Reputation points
2025-09-16T08:06:52.5766667+00:00

I created an Adaptive Card in Copilot Studio and tested it on the Copilot Studio website, where it works correctly. However, when I add the agent to Microsoft Teams, I receive the following error:

An error has occurred.

Error code: AdaptiveCardInvalid

Conversation Id: a:1wfKMA18CPUe31uKzFnJFuKa2kV7Tbx_JSY7NbpJIJhPVRm1PChnlR-zdX8o954Rho4CoVl5LoRm0ZFlft82ypXJQgFyxuFsR0wE3lLWJ18Fqers-4veekoM8MCS1LrKy

Time (UTC): 2025-09-16T07:26:38.499Z

Below is my Adaptive Card JSON:

{

"type": "AdaptiveCard",

"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",

"version": "1.4",

"body": [

{

  "type": "Input.ChoiceSet",

  "label": "Attendees",

  "choices": ForAll(

    Topic.AttendeesOutput,

    { "title": ThisRecord.displayName, "value": ThisRecord.userPrincipalName }

  ),

  "placeholder": "Select attendees",

  "id": "attendees",

  "style": "compact",

  "isMultiSelect": true

},

{

  "type": "Input.ChoiceSet",

  "id": "timezone",

  "label": "Select Time Zone",

  "choices": [

    { "title": "Japan Standard Time (JST)", "value": "Tokyo Standard Time" },

    { "title": "Myanmar Standard Time (MMT)", "value": "Myanmar Standard Time" }

  ],

  "style": "compact",

  "isMultiSelect": false

},

{

  "type": "Input.ChoiceSet",

  "id": "meetingDuration",

  "label": "Select Meeting Time (hours)",

  "choices": [

    { "title": "0.5hr", "value": "30" },

    { "title": "1hr", "value": "60" },

    { "title": "1.5hr", "value": "90" },

    { "title": "2hr", "value": "120" },

    { "title": "2.5hr", "value": "150" },

    { "title": "3hr", "value": "180" }

  ],

  "style": "compact",

  "isMultiSelect": false

}

],

"actions": [

{

  "type": "Action.Submit",

  "title": "Search"

}

]

}

Microsoft Copilot | Microsoft 365 Copilot | Development

Answer accepted by question author
Karan Shewale 2,585 Reputation points Microsoft External Staff
2025-09-17T10:44:10.17+00:00

You are getting the AdaptiveCardInvalid error in Teams because your Adaptive Card JSON contains Power Fx expressions like ForAll() and ThisRecord. These work fine in Copilot Studio’s preview but Teams does not support them. Microsoft Teams only accepts plain JSON with the choices already built. To fix this, you need to prepare the choices list in your agent logic (for example, from your topic output or a flow) and pass it into the card as a static array of objects. That way, when Teams receives the card, it only sees the valid Adaptive Card JSON and can render it correctly. You can also test your card in the Adaptive Card Designer by choosing Microsoft Teams as the host to make sure it’s valid.

Here’s an example of the corrected card snippet:

{
  "type": "AdaptiveCard",
  "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.4",
  "body": [
    {
      "type": "Input.ChoiceSet",
      "id": "attendees",
      "label": "Attendees",
      "choices": [
        { "title": "Alice Smith", "value": "******@contoso.com" },
        { "title": "Bob Lee", "value": "******@contoso.com" }
      ],
      "placeholder": "Select attendees",
      "style": "compact",
      "isMultiSelect": true
    },
    {
      "type": "Input.ChoiceSet",
      "id": "timezone",
      "label": "Select Time Zone",
      "choices": [
        { "title": "Japan Standard Time (JST)", "value": "Tokyo Standard Time" },
        { "title": "Myanmar Standard Time (MMT)", "value": "Myanmar Standard Time" }
      ],
      "style": "compact",
      "isMultiSelect": false
    },
    {
      "type": "Input.ChoiceSet",
      "id": "meetingDuration",
      "label": "Select Meeting Time (hours)",
      "choices": [
        { "title": "0.5hr", "value": "30" },
        { "title": "1hr", "value": "60" },
        { "title": "1.5hr", "value": "90" },
        { "title": "2hr", "value": "120" },
        { "title": "2.5hr", "value": "150" },
        { "title": "3hr", "value": "180" }
      ],
      "style": "compact",
      "isMultiSelect": false
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Search"
    }
  ]
}

This way the card contains only valid JSON and no Power Fx formulas, so Teams will render it without error.

Relevant Official Docs:

Thanks,  

Karan Shewale. 

*************************************************************************  

If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback Microsoft Copilot Developer Community Response Feedbacklink. Click here Escalation for Microsoft Teams Developer Community response

 to escalate. 

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.