When Sending an Adaptive Card to Teams via MS Graph Can The Copy Link & Title Bar Be Removed?

%3CLINGO-SUB%20id%3D%22lingo-sub-2105564%22%20slang%3D%22en-US%22%3EWhen%20Sending%20an%20Adaptive%20Card%20to%20Teams%20via%20MS%20Graph%20Can%20The%20Copy%20Link%20%26amp%3B%20Title%20Bar%20Be%20Removed%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2105564%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20using%20MS%20Graph%20and%20I%20use%20the%20message%20endpoint%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-post-message%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Esend%20a%20message%3C%2FA%3E%20to%20a%20channel%20in%20MS%20Teams%2C%20and%20that%20message%20includes%20an%20adaptive%20card%20as%20an%20attachment%2C%20I%20always%20end%20up%20with%20a%20blank%20space%2Fpadding%20at%20the%20top%20of%20the%20card%2C%20and%203-dot%20menu%20to%20the%20right%20(with%20a%20Copy%20option).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F250224i2CFB3081ED1918F4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20padding%20doesn't%20seem%20to%20appear%20on%20any%20of%20the%20examples%20given%20in%20the%20documentation%2C%20and%20the%20blank%20space%20at%20the%20top%20of%20all%20my%20cards%20looks%20a%20bit%20naff.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20remove%20this%20spacing%3F%20Or%2C%20alternatively%2C%20is%20there%20a%20way%20to%20add%20content%20into%20this%20space%2C%20and%20alter%20the%20options%20shown%20under%20the%203-dot%20menu%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEndpoint%20being%20used...%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fteams%2F%7Bteam-id%7D%2Fchannels%2F%7Bchannel-id%7D%2Fmessages%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fteams%2F%7Bteam-id%7D%2Fchannels%2F%7Bchannel-id%7D%2Fmessages%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%20request%20body%20being%20used...%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22body%22%3A%20%7B%0A%20%20%20%20%22contentType%22%3A%20%22html%22%2C%0A%20%20%20%20%22content%22%3A%20%22%3CATTACHMENT%20id%3D%22%5C%26quot%3B4465B062-EE1C-4E0F-B944-3B7AF61EAF40%5C%26quot%3B%22%3E%3C%2FATTACHMENT%3E%22%0A%20%20%7D%2C%0A%20%20%22attachments%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22id%22%3A%20%224465B062-EE1C-4E0F-B944-3B7AF61EAF40%22%2C%0A%20%20%20%20%20%20%22contentType%22%3A%20%22application%2Fvnd.microsoft.card.adaptive%22%2C%0A%20%20%20%20%20%20%22content%22%3A%20%22%7B%5Cn%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22AdaptiveCard%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22%24schema%5C%22%3A%20%5C%22http%3A%2F%2Fadaptivecards.io%2Fschemas%2Fadaptive-card.json%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22version%5C%22%3A%20%5C%221.3%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22body%5C%22%3A%20%5B%5Cn%20%20%20%20%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22TextBlock%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22size%5C%22%3A%20%5C%22Large%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22weight%5C%22%3A%20%5C%22Bolder%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22text%5C%22%3A%20%5C%22My%20News%20Item%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22wrap%5C%22%3A%20true%5Cn%20%20%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%20%20%5D%2C%5Cn%20%20%20%20%20%20%20%20%5C%22actions%5C%22%3A%20%5B%5Cn%20%20%20%20%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22Action.OpenUrl%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22title%5C%22%3A%20%5C%22View%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%20%20%20%20%5C%22url%5C%22%3A%20%5C%22https%3A%2F%2Fbing.com%5C%22%5Cn%20%20%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%20%20%5D%5Cn%20%20%20%20%20%20%7D%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2105564%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdaptive%20Cards%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMS%20Graph%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2115112%22%20slang%3D%22en-US%22%3ERe%3A%20When%20Sending%20an%20Adaptive%20Card%20to%20Teams%20via%20MS%20Graph%20Can%20The%20Copy%20Link%20%26amp%3B%20Title%20Bar%20Be%20Removed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2115112%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F945841%22%20target%3D%22_blank%22%3E%40pallen1980%3C%2FA%3E%2C%20Thank%20you%20for%20reaching%20out%20to%20us.%20%3CBR%20%2F%3EIt%20is%20not%20possible%20to%20remove%26nbsp%3B%3CSPAN%3Eblank%20space%2Fpadding%20at%20the%20top%20of%20the%20card%2C%20and%203-dot%20menu%20to%20the%20right%20(with%20a%20Copy%20option).%3C%2FSPAN%3E%20This%20is%20By%20design.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2115333%22%20slang%3D%22en-US%22%3ERe%3A%20When%20Sending%20an%20Adaptive%20Card%20to%20Teams%20via%20MS%20Graph%20Can%20The%20Copy%20Link%20%26amp%3B%20Title%20Bar%20Be%20Removed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2115333%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F888061%22%20target%3D%22_blank%22%3E%40Mallipriya_MSFT%3C%2FA%3E%26nbsp%3BThanks%20for%20letting%20me%20know.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20added%20a%20uservoice%20request%20to%20suggest%20it%20as%20a%20future%20improvement%20to%20the%20graph%20api%20(if%2Fwhen%20your%20devteam%20gets%20time)...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmicrosoftgraph.uservoice.com%2Fforums%2F920506-microsoft-graph-feature-requests%2Fsuggestions%2F42632008-amend-remove-the-attachment-title-bar-when-sending%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftgraph.uservoice.com%2Fforums%2F920506-microsoft-graph-feature-requests%2Fsuggestions%2F42632008-amend-remove-the-attachment-title-bar-when-sending%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20for%20now%2C%20we'll%20work%20around%20the%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2513923%22%20slang%3D%22en-US%22%3ERe%3A%20When%20Sending%20an%20Adaptive%20Card%20to%20Teams%20via%20MS%20Graph%20Can%20The%20Copy%20Link%20%26amp%3B%20Title%20Bar%20Be%20Removed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2513923%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F888061%22%20target%3D%22_blank%22%3E%40Mallipriya_MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESome%20one%20needs%20to%20have%20a%20word%20to%20your%20designers%20then.%20It%20looks%20bad%20and%20takes%20up%20unnecessary%20space%20on%20the%20page.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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).

 

image.png

 

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      }"
    }
  ]
}

 

3 Replies

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. 

@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)...

 

https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/4263...

 

And for now, we'll work around the problem.

 

Many Thanks

@Mallipriya_MSFT 

 

Some one needs to have a word to your designers then. It looks bad and takes up unnecessary space on the page.