Building and customizing solutions using Microsoft 365 Copilot APIs and tools
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.