Secondary actions in adaptive cards broken for channel conversation

Brass Contributor

I have a strange behaviour in teams where an adaptive card is rendered differently depending on if the bot is posting it in a chat or in a teams channel.

 

The adaptive card (reduced to the absolute minimum):

{
  "contentType": "application/vnd.microsoft.card.adaptive",
  "content": {
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4",
    "body": [
      {
        "type": "TextBlock",
        "text": "Intro text"
      },
      {
        "type": "ActionSet",
        "actions": [
          {
            "type": "Action.Submit",
            "title": "Set due date"
          },
          {
            "type": "Action.Submit",
            "title": "Secondary option",
            "mode": "secondary"
          }
        ]
      }
    ]
  }
}

 When the bot sends it into a chat, the rendering of the secondary action looks like that (expected behaviour):

Screenshot 2023-05-05 at 15.59.39.png


When it sends a message into a channel, the secondary option is rendered like that:

Screenshot 2023-05-05 at 15.59.50.png

There is a rectangle in front even though there is no image specified. Adding an icon to the action makes it even worse. The icon is not rendered properly but totally blown out of proportion.

Is this a bug? Is there maybe a parameter that would prevent this rendering?

 

8 Replies
Thank you for reporting this issue, we will check this and update you.
We are also able to repro this issue, we raised a bug for the same. We will keep you posted on the updates. Thank you!
Any updates here? I have retested and it is still inconsistent in the image handling.
Even worse, adding a secondary action now seems to block the rendering of the adaptive card in the IOS app completely.
Apologies for the delay, we do not have any update to share. We are following up with engineering team for updates. We will keep you posted.

@Meghana-MSFT 

 

Primary actions are also not working in a Teams Channel.

 

Consider the following card;


{
	"body": [
		
		{
			"type": "Input.ChoiceSet",
			"label": "Pick One ",
			"choices": "${mylist}",
			"isRequired": true,
			"errorMessage": "Please select a an item",
			"id": "itemId"
		}
		{
			"type": "ActionSet",
			"actions": [
				{
					"type": "Action.Execute",
					"verb": "confirm-selection",
					"title": "OK",
					"style": "positive",
					"data": {
						"dummy": "This is required for IOS to work"
					}
				}
			]
		}
	]
}

 

When this card is used in a personal / group conversation, and the user clicks on OK, the following is submitted (correctly)

{
	"dummy": "This is required for IOS to work",
	"itemId" : 3
}

When this card is used in a Teams Channel , and the user clicks on OK, the following is submitted (incorrectly)

{
	"dummy": "This is required for IOS to work"
}

 

Note that itemId is missing in the response.

@Dagwai - Apologies for the delay. Can you please check if you are facing this issue with "type": "Action.Submit" as well. We just checked with action.submit and it works well in both personal and channel scope.

@Dagwai - We are also able to repro this issue, Action.Execute does not include Input Values when operating within a channel. A bug has been filed for this issue already. Also this is being tracked here - https://learn.microsoft.com/en-us/answers/questions/1295145/why-isnt-action-execute-including-input-...

@jocsch , @Dagwai - The 2 issues mentioned in this thread are fixed and are working fine. We have tested and verified the fix.

  1. Rectangle box issue beside secondary option in channel scope is fixed - MeghanaMSFT_0-1693228269755.png

     

  2. Action.Execute does not include Input Values when operating within a channel issue - Tested in MS Teams desktop (Microsoft Teams Version 1.6.00.20958) and web client. https://learn.microsoft.com/en-us/answers/questions/1295145/why-isnt-action-execute-including-input-...