EDIT: added image links back to payload.
Trying to create a table using Adaptive Cards and sending it to a webhook through a teams workflow, but no matter what I try with the table column weighting (Unless I hard code pixel widths, which defeats the purpose of adaptive) the columns do not honour the width in MSTeams, but do in the Microsoft Adaptive Card preview tool.
Not sure what I’m missing, any suggestions welcome.
I’ve omit some urls for images that are not relevant.
Expected behaviour:
Actual behaviour:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"columns": [
{
"items": [
{
"text": "✅ Intune Applications Created Using Local-Content (4)",
"weight": "bolder",
"size": "large",
"wrap": true,
"type": "TextBlock"
}
],
"width": "stretch",
"type": "Column"
},
{
"items": [
{
"url": "https://iili.io/JjeJoEx.png",
"size": "Medium",
"horizontalAlignment": "Right",
"type": "Image"
}
],
"width": "auto",
"type": "Column"
}
],
"separator": true,
"type": "ColumnSet"
},
{
"columns": [
{
"width": "1"
},
{
"width": "5"
},
{
"width": "3"
},
{
"width": "3"
},
{
"width": "2"
}
],
"firstRowAsHeader": true,
"gridStyle": "emphasis",
"rows": [
{
"cells": [
{
"items": [
{
"text": "",
"isSubtle": true,
"style": "heading",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Product",
"isSubtle": true,
"style": "heading",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Severity",
"isSubtle": true,
"style": "heading",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Classification",
"isSubtle": true,
"style": "heading",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "CVEs",
"isSubtle": true,
"style": "heading",
"type": "TextBlock"
}
],
"type": "TableCell"
}
],
"type": "TableRow"
},
{
"cells": [
{
"items": [
{
"url": "https://raw.githubusercontent.com/smcallister594/scotscottmca/refs/heads/main/assets/images/7-Zip.png",
"size": "Small",
"type": "Image"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "[7-Zip 24.09 (EXE-x64)](http://www.7-zip.org/history.txt)",
"wrap": true,
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Important",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Security",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "1",
"type": "TextBlock"
}
],
"type": "TableCell"
}
],
"type": "TableRow"
},
{
"cells": [
{
"items": [
{
"url": "https://raw.githubusercontent.com/smcallister594/scotscottmca/refs/heads/main/assets/images/7-Zip.png",
"size": "small",
"type": "Image"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "[7-Zip 24.09 (EXE-x86)](http://www.7-zip.org/history.txt)",
"wrap": true,
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Important",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Security",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "1",
"type": "TextBlock"
}
],
"type": "TableCell"
}
],
"type": "TableRow"
},
{
"cells": [
{
"items": [
{
"url": "https://raw.githubusercontent.com/smcallister594/scotscottmca/refs/heads/main/assets/images/7-Zip.png",
"size": "Small",
"type": "Image"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "[7-Zip 24.09 (MSI-x64)](http://www.7-zip.org/history.txt)",
"wrap": true,
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Important",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Security",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "1",
"type": "TextBlock"
}
],
"type": "TableCell"
}
],
"type": "TableRow"
},
{
"cells": [
{
"items": [
{
"url": "https://raw.githubusercontent.com/smcallister594/scotscottmca/refs/heads/main/assets/images/7-Zip.png",
"size": "Small",
"type": "Image"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "[7-Zip 24.09 (MSI-x86)](http://www.7-zip.org/history.txt)",
"wrap": true,
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Important",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "Security",
"type": "TextBlock"
}
],
"type": "TableCell"
},
{
"items": [
{
"text": "1",
"type": "TextBlock"
}
],
"type": "TableCell"
}
],
"type": "TableRow"
}
],
"verticalCellContentAlignment": "Center",
"separator": true,
"type": "Table"
},
{
"columns": [
{
"items": [
{
"url": "https://patchmypc.com/wp-content/uploads/2018/06/Patch20My20PC20-20Logo20Horizontal20-20300ppi.png",
"size": "Medium",
"width": "180px",
"type": "Image"
}
],
"width": "auto",
"verticalContentAlignment": "Center",
"type": "Column"
},
{
"items": [
{
"text": "Report generated on **CM1**. Intune Tenant: **ScotScottMcA**",
"size": "small",
"isSubtle": true,
"wrap": true,
"horizontalAlignment": "Right",
"spacing": "None",
"type": "TextBlock"
},
{
"text": "12/20/2024 3:23:11 PM (GMT Standard Time)",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "Right",
"spacing": "None",
"type": "TextBlock"
}
],
"width": "stretch",
"verticalContentAlignment": "Center",
"type": "Column"
}
],
"separator": true,
"spacing": "None",
"type": "ColumnSet"
}
],
"msteams": {
"width": "Full"
}
}
4