botframework-sdk
botframework-sdk copied to clipboard
[Question] ThumbnailCard button does not work as expected in Microsoft Teams but works in Bot Emulator
System Information (Required)
- SDK Language: .NET/C#
- SDK Version: 3.8.1
- Development Environment: AZURE_APP
Issue Description
I am currently using a ThumbnailCard which has a button that leads to a website url for authentication purposes. The ThumbnailCard displays as expected in Microsoft Teams chat but clicking the button does nothing. The button does however work in Bot Emulator as expected.
Code Example
ThumbnailCard plCard = new ThumbnailCard()
{
Title = "Please login in order to complete creation of support request:",
Subtitle = " ",
Images = new List<CardImage>(),
Buttons = GetCardActions(url, "signin")
};
plAttachment = plCard.ToAttachment();
IMessageActivity response = context.MakeMessage();
response.Type = "message";
response.Attachments = new List<Attachment>();
response.Attachments.Add(plAttachment);
context.PostAsync(response);
Issue has been fixed by using "openUrl":
Updated Code
Buttons = new List<CardAction> { new CardAction(ActionTypes.OpenUrl, "Get Started", value: url) }