Forum Discussion
HTTP POST request to incoming webhook with valid adaptive card json payload returns a 200 with error
Is there any update on this.
Best,
Keerthi
Keerthi_sh2085 , In the provided JSON the TextRun elements have empty text properties. This might cause issues. Also, many elements have isVisible set to false. The ActionSet elements have empty actions arrays.
Below updated JSON works properly:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "Container",
"bleed": false,
"minHeight": "0px",
"style": "default",
"verticalContentAlignment": "center",
"items": [
{
"type": "TextBlock",
"size": "large",
"style": "heading",
"wrap": true,
"text": "Heading Text"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "RichTextBlock",
"inlines": [
{
"type": "TextRun",
"text": "Status: ",
"wrap": true,
"fontType": "monospace"
},
{
"type": "TextRun",
"text": "Active",
"wrap": true,
"color": "default",
"weight": "bolder",
"fontType": "monospace"
}
]
}
]
},
{
"type": "Column",
"items": [
{
"type": "RichTextBlock",
"inlines": [
{
"type": "TextRun",
"text": "Actor: ",
"wrap": true,
"fontType": "monospace"
},
{
"type": "TextRun",
"text": "John Doe",
"wrap": true,
"size": "medium"
}
]
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"style": "emphasis",
"minHeight": "40px",
"items": [
{
"type": "TextBlock",
"text": "The minimal message!",
"wrap": true
}
]
}
]
}
]
}
}
]
}
Result:
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- Keerthi_sh2085Oct 20, 2024Copper Contributor
Prasad_Das-MSFT If i read the Teams documentation right, MS teams supports adaptive cards spec. So when i try out the payload in this page https://adaptivecards.io/designer/, with the empty text in TextRun property and isVisible set to false, it says its a valid schema and also shows the rendered view. This was working before and now its not. Does this mean adaptive cards is no longer fully supported in Teams ?
- Prasad_Das-MSFTNov 06, 2024
Microsoft
Adaptive cards are fully supported in Teams. Just the case that, the rendering of card in designer and Teams client doesn't align in this specific scenario. We will let engineering team know about this discrepancy. Thanks for informing.