Open mike-schenk opened 5 months ago
Teams has stopped supporting the themeColor property of MessageCard. See https://github.com/MicrosoftDocs/msteams-docs/issues/10062
themeColor
A possible replacement could be to use the new support for AdaptiveCards and their built-in limited "styles" on Containers, Columns, or TableCells.
AdaptiveCard
Container
Column
TableCell
See some reference documentation at
The following HTTP request body can be POSTed to the webhook connector URL and demonstrates some possibile ways to indicate success or failure.
POST
Note the following in the example below:
"width":"Full"
"bleed": true
{ "type":"message", "attachments":[ { "contentType":"application/vnd.microsoft.card.adaptive", "contentUrl":null, "content":{ "$schema":"http://adaptivecards.io/schemas/adaptive-card.json", "type":"AdaptiveCard", "version":"1.5", "body":[ { "type": "Table", "bleed": true, "showGridLines" : false, "columns": [{"width":1}], "rows": [ { "type": "TableRow", "cells": [ { "type": "TableCell", "style":"good", "bleed":true, "items": [ { "type": "TextBlock", "text": "SUCCESS" } ] } ] } ] }, { "type": "ColumnSet", "bleed": true, "columns": [ { "type": "Column", "bleed": true, "style": "good", "items": [ { "type": "TextBlock", "text": "SUCCESS" } ] } ] }, { "type": "Container", "style": "good", "bleed": true, "items": [{"type":"TextBlock", "text":"SUCCESS"}] }, { "type": "Container", "style": "attention", "bleed": true, "items": [{"type":"TextBlock", "text":"FAILURE"}] }, { "type": "Container", "style": "warning", "bleed": true, "items": [{"type":"TextBlock", "text":"CAUTION"}] }, { "type": "TextBlock", "text": "For Samples and Templates, see [https://adaptivecards.io/samples](https://adaptivecards.io/samples)" } ], "msteams": { "width":"Full" } } } ] }
Hate to disappoint you, but you can't use AdaptiveCard, because it is not supported by connectors:
issue#742 #808
It's like always fixing the docs, but not the actual problem.
Teams has stopped supporting the
themeColor
property of MessageCard. See https://github.com/MicrosoftDocs/msteams-docs/issues/10062A possible replacement could be to use the new support for
AdaptiveCard
s and their built-in limited "styles" onContainer
s,Column
s, orTableCell
s.See some reference documentation at
The following HTTP request body can be
POST
ed to the webhook connector URL and demonstrates some possibile ways to indicate success or failure.Note the following in the example below:
"width":"Full"
as described at https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cconnector-html#construct-full-width-cards"bleed": true
to make a more compact layout