Forum Discussion

LifenYan's avatar
LifenYan
Copper Contributor
Aug 22, 2020

Adaptive card in MS teams: Can I add action with primary/destructive style?

I want to have an adaptive card with actions in different color, (image below is a mockup). I did some research and looks like this is possible with adaptive card v1.2.  But I couldn't get it to work. I tried the style of Action.Submit as "positive" and "destructive", but don't see any difference in color. 

 

According to https://adaptivecards.io/blog/2019/Announcing-1.2/, they support Action sentiment (primary/destruction)  in v1.2.

According to https://developer.microsoft.com/en-us/office/blogs/adaptive-cards-1-2-are-ga-in-microsoft-teams/, Adaptive cards 1.2 are GA in Microsoft Teams.

 

However, there is another community thread, in which the conclusion is, "When you add button using action set the button will be rendered with background purple, If button is directly added to card then the card will be rendered with the white background. This is by design."   - This is also what I observed with my MS teams app.  Other than this, I don't have any control of the action color.

 

My questions are,

1) Is it possible to change action color?

2) If yes, how could I get Adaptive card v1.2 work? 

    My MS teams app is desktop app and is in version 1.3.00.21953 (downloaded recently).  

   In my Adaptive card JSON, I specified version as 1.2 as below,

  

"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.2",
 
Thanks!

1 Reply

  • Hi LifenYan ,

     

    Just looking at your first screenshot and that is how I would expect it to be with the positive. As I would expect the colour scheme to be in keeping with Teams.

    However are you saying that to do positive or destructive on the approve action it showed the same as your screenshot each time?

     

    Thanks

     

    Henry 

Resources