Jan 28 2021 03:05 AM
When using MS Graph and I use the message endpoint to send a message to a channel in MS Teams, and that message includes an adaptive card as an attachment, I always end up with a blank space/padding at the top of the card, and 3-dot menu to the right (with a Copy option).
This padding doesn't seem to appear on any of the examples given in the documentation, and the blank space at the top of all my cards looks a bit naff.
Is there a way to remove this spacing? Or, alternatively, is there a way to add content into this space, and alter the options shown under the 3-dot menu?
Endpoint being used...
https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages
Example request body being used...
{
"body": {
"contentType": "html",
"content": "<attachment id=\"4465B062-EE1C-4E0F-B944-3B7AF61EAF40\"></attachment>"
},
"attachments": [
{
"id": "4465B062-EE1C-4E0F-B944-3B7AF61EAF40",
"contentType": "application/vnd.microsoft.card.adaptive",
"content": "{\n \"type\": \"AdaptiveCard\",\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n \"version\": \"1.3\",\n \"body\": [\n {\n \"type\": \"TextBlock\",\n \"size\": \"Large\",\n \"weight\": \"Bolder\",\n \"text\": \"My News Item\",\n \"wrap\": true\n }\n ],\n \"actions\": [\n {\n \"type\": \"Action.OpenUrl\",\n \"title\": \"View\",\n \"url\": \"https://bing.com\"\n }\n ]\n }"
}
]
}
Feb 05 2021 12:28 AM
Hi @pallen1980, Thank you for reaching out to us.
It is not possible to remove blank space/padding at the top of the card, and 3-dot menu to the right (with a Copy option). This is By design.
Feb 05 2021 05:34 AM
@Mallipriya_MSFT Thanks for letting me know.
I've added a uservoice request to suggest it as a future improvement to the graph api (if/when your devteam gets time)...
And for now, we'll work around the problem.
Many Thanks
Jul 03 2021 09:56 PM
Some one needs to have a word to your designers then. It looks bad and takes up unnecessary space on the page.