I have an azure function which sends a Teams message each time a new release has been succesfully deployed. It shows all delivered work items: bugs and stories. Until a few months ago the icons I have in my message showed color. It has stopped doing so, it shows only a black color. The url of the images still shows the correct image and color so there's nothing wrong with that.
Has something changed for the Teams renderer or do I need to adjust my adaptive card template?
The following is my template:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"size": "Large",
"type": "TextBlock",
"text": "${ReleaseTitle}",
"weight": "Bolder"
}
],
"width": "stretch"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "[Go to query](${QueryUrl})",
"isSubtle": true,
"height": "stretch"
}
]
},
{
"$when": "${ShowAdditionalQuery == true}",
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "[additional query](${AdditionalQueryUrl})",
"isSubtle": true,
"height": "stretch"
}
]
}
]
},
{
"separator": true,
"text": "",
"type": "TextBlock"
},
{
"$when": "${$root.UserStories.Count > 0}",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"url": "https://tfsprodweusu4.visualstudio.com/_apis/wit/workItemIcons/icon_book?v=2&color=0098C7",
"width": "20px"
}
],
"width": "auto"
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "User Stories",
"weight": "Bolder"
}
]
}
]
},
{
"$when": "${$root.UserStories.Count > 0}",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 4,
"items": [
{
"type": "TextBlock",
"text": "[${WorkItemId} - ${Title}](${Url})",
"isSubtle": true
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "${State}",
"isSubtle": true
}
]
}
],
"$data": "${$root.UserStories}"
},
{
"$when": "${$root.Bugs.Count > 0}",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"url": "https://tfsprodweusu4.visualstudio.com/_apis/wit/workItemIcons/icon_insect?v=2&color=CC293D",
"width": "20px"
}
],
"width": "auto"
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Bugfixes",
"weight": "Bolder"
}
]
}
]
},
{
"$when": "${$root.Bugs.Count > 0}",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 4,
"items": [
{
"type": "TextBlock",
"text": "[${WorkItemId} - ${Title}](${Url})",
"isSubtle": true
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "${State}",
"isSubtle": true
}
]
}
],
"$data": "${$root.Bugs}"
}
]
}
}
]
}
any help would be greatly appreciated
As pointed out by Meghana-MSFT:
Changing the position of the "v" and "color" querystring parameter fixes the issue.
e.g. Old (not working - no color) https://tfsprodweusu4.visualstudio.com/_apis/wit/workItemIcons/icon_book?v=2&color=0098C7
New (working - with color) https://tfsprodweusu4.visualstudio.com/_apis/wit/workItemIcons/icon_book?color=0098C7&v=2