Forum Discussion
Christopher_Lutz
Oct 06, 2023Copper Contributor
Teams update breaks cards
After upgrading to the newest version of Microsoft Teams for desktop we are receiving an unusual error in the new teams client.
On the newest version of the teams client we are getting the following message when attempting to read a message posted via the web hook api.
"Card - access it on https://go.skype.com/cards.unsupported."
On the older version of MS Teams I am able to view the message normally. There are no errors in generated by the API calls. I do not think it is related to the webhook or the api code. The message itself is a simple text alert message with a URL in the message referencing a support ticket.
Did support for cards/API created messages change in the latest version? Is there a new permissions setting that needs to be set? Thank you for your assistance.
Version Information.
You have Microsoft Teams version 23257.2616.2423.5046.
You've got the latest version. It was last updated on 10/6/2023.
The client version is 49/23091420217.
- Meghana-MSFT
I think I might have found what may have happened. If I remove the following line from C# code it renders correctly in both the old version and the new version.
Type = "message",
5 Replies
Sort By
- Christopher_LutzCopper ContributorMeghana-MSFT
I think I might have found what may have happened. If I remove the following line from C# code it renders correctly in both the old version and the new version.
Type = "message", - Christopher_LutzCopper Contributor
The JSON payload for my test case looks like this....
{"type":"message","Attachments":null,"Body":null,"@title":"New Test Message.","text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget laoreet turpis. Donec eu porta nunc. \nSed volutpat vulputate ipsum, at sagittis velit interdum sit amet. Morbi nec sagittis mauris, sit amet convallis risus. Pellentesque eu \ncongue ligula, et pellentesque ligula. Duis volutpat, ex vel fermentum vulputate, tellus lorem maximus libero, ut imperdiet nisi ante vel \nmetus. Integer quis erat mattis, egestas turpis ut, finibus quam. Phasellus congue consequat feugiat.\n\nSuspendisse congue, ligula quis pretium maximus, libero lorem molestie metus, id blandit mauris velit id felis. \nPhasellus tortor orci, pellentesque nec sapien id, sollicitudin imperdiet odio. Duis non odio tellus. Aenean cursus pretium \nturpis at sodales. Phasellus accumsan mi non ultrices ultricies. Aliquam tincidunt est vitae nisi fermentum tincidunt. \nAenean consequat metus non sollicitudin facilisis. Morbi nisi velit, congue in volutpat tempor, malesuada et mi. \nMauris pharetra lorem enim, ac vestibulum enim tristique non. Curabitur ut felis felis. \nInteger pellentesque tellus eu felis iaculis euismod. Nam laoreet lobortis lacus, at faucibus nisl imperdiet eget.|"}
The message in the new version of teams
The exact same message when viewed in the old version of teams.
- Christopher_LutzCopper ContributorSome more information.
This is the C# function that I am using to post the message to the web hook end point
/// <summary>
/// Send a message to teams group
/// </summary>
/// <param name="heading">Message Heading</param>
/// <param name="message">Message to send</param>
/// <param name="endpoint">End point URL</param>
public async static Task<bool> SendMessage(string endpoint, string message, string heading)
{
ContentAttributes content = new()
{
Type = "message",
Title = heading,
Text = message?.Replace("\r\n", "\n", OrdinalIgnoreCase) ?? string.Empty,
};
string contentJson = JsonConvert.SerializeObject(content);
using StringContent messageCard = new(contentJson);
using HttpClient Client = new();
HttpResponseMessage httpResponseMessage = await Client.PostAsync(new Uri(endpoint), messageCard).ConfigureAwait(false);
string response = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
if (response == "1")
{
return true;
}
return false;
} - Meghana-MSFT
Microsoft
Christopher_Lutz - We checked this at our end by sending an adaptive card like below and it is rendering fine.
- Meghana-MSFT
Microsoft
Could you please share more details on this so that we can reproduce this locally.