cancel
Showing results for 
Search instead for 
Did you mean: 
Priyaranjan

Handling Adaptive Cards Version Mismatch Issue

Priyaranjan_6-1647964616383.png

 

 

Introduction

Problem Statement

Solution

Summary

 

Introduction

 

Adaptive Cards is a way in which Developers can exchange data and content in a common way and the JSON payload used for creating the card can be used in any device or UI Framework. In addition to that there is no programming requirements for building these cards as the structure is completely defined by JSON(JavaScript Object Notation).In addition to it, we can style the card in a standard way so that it appears consistently across different platforms.

We can use the adaptive card designer to design the JSON for the adaptive card.

 

Priyaranjan_0-1647964606176.png

 

We have covered a few articles on how to work with Adaptive Card JSON to render the cards in Teams below  :

 

Problem Statement

However, while adding the generated JSON to the Power Automate Post adaptive card in chat or channel was throwing the error “We are sorry, this card couldn’t be displayed”

 

Priyaranjan_1-1647964606179.png

 

 

Solution

 

There can be multiple reasons for this especially if the JSON is not formatted correctly as per syntax. But one of the possible causes if we are copy pasting the developed JSON from Adaptive card designer is that, it targets version 1.5 by default. Taking a look at the official documentation, the supported versions in Microsoft Teams are 1.4 for Bot card cards and 1.3 for User sent cards. This holds true as of Jan 2022 and may change in the subsequent months as new updates are rolled out to Teams Platform

Priyaranjan_2-1647964606183.png

 

We can either change the target version in the adaptive card designer while working on the JSON as below:

 

Priyaranjan_3-1647964606188.png

 

Or we can easily change it directly in the JSON schema by updating the version number to 1.4 or less:

 

Priyaranjan_4-1647964606192.png

 

 This will fix the issue with the rendering of the adaptive card.

Note: Since we are working on a Bot Sent Card, we have downgraded to v1.4, in case you are working on a User sent card, ensure to downgrade to v1.3. This downgrade holds good as of Jan 2022 and in the future when updates are rolled out to Teams, higher schema versions would be supported.

 

Priyaranjan_5-1647964606196.png

 

Summary

Thus we saw a potential issue that would cause problems with the rendering of the adaptive cards in Teams due to mismatch in supporter version number and the ways to solve it.

 

 

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/