MS Team Adaptive Card Task/Fetch not working

Viewed 48

My intention is to show a pop up window/modal in the microsoft team app or web application. I have trying to use Task/Fetch but no luck. Below is my adaptive card:

export function getTestCard() {
  const signInUrl = 'https://yunus.ngrok.io/api/v1/public/authorize'

  const cardData = {
    type: 'AdaptiveCard',
    version: '1.3',
    body: [
      {
        type: 'TextBlock',
        text: `Test Card`,
        wrap: true,
      },
    ],
    actions: [
      {
        type: 'Action.Submit',
        id: 'btnBuy',
        title: 'Buy',
        data: {
          msteams: {
            type: 'task/fetch',
            url: encodeURI(signInUrl),
            fallbackUrl: encodeURI(signInUrl),
          },
        },
      },
      {
        type: 'Action.OpenUrl',
        fullwidth: true,
        title: 'Support',
        url: encodeURI(signInUrl),
      },
    ],
  }
  const card = CardFactory.adaptiveCard(cardData)
  return card
}

When I click Buy it does not do anything, not even one single error message. When I click Support it opens the link in a new tab in a browser. Here is my manifest valid domains:

"validDomains": [
    "*.ngrok.io",
    "teams.microsoft.com"
]

My signInUrl returns an HTML page.

0 Answers
Related