We are currently facing an issue with adaptive cards within our Microsoft Teams tabs. This has been functioning correctly since the launch of our application, but we've recently encountered a problem.
When we execute the following code:
dialog.adaptiveCard.open(adaptiveCardDialogInfo, dialogResponse);
The application breaks.
Additionally, the method:
dialog.adaptiveCard.isSupported() //is returning false.
Unfortunately, no explicit error message is displayed, but we do receive an errorCode: 100.
Our current versions are:
@microsoft/teams-js: 2.12.0
@angular/core: ^15.0.0
Has anyone else encountered this issue or can provide some guidance on how to resolve it? Any help would be greatly appreciated.
Sample Code:
card: JSON.stringify({
type: "AdaptiveCard",
body: [
{
type: "TextBlock",
size: "Medium",
weight: "Bolder",
text: "Select user(s) in your organization."
},
{
label: "1) Select user(s): ",
isRequired: true,
placeholder: "Search and select user(s)",
type: "Input.ChoiceSet",
choices: [],
"choices.data": {
type: "Data.Query",
dataset: "graph.microsoft.com/users"
},
id: "selection",
isMultiSelect: true,
errorMessage: "Atleast one user must be selected."
},
{
isRequired: true,
label: "2) Message",
type: "Input.Text",
size:"Medium",
placeholder: "Enter your message",
id: 'message',
errorMessage: "A message is required."
},
{
type: "Input.Toggle",
label: "3) Summary",
title: "Include Summary?",
valueOn: "1",
valueOff: "2",
value: "1",
id: "sum_type"
}
],
actions: [
{
type: "Action.Submit",
title: "Cancel",
associatedInputs: "none"
},
{
type: "Action.Submit",
title: "Send"
},
],
$schema: "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.4"
})
}
// RUN
dialog.adaptiveCard.open(adaptiveCardDialogInfo, dialogResponse);
Thank you!