botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Adaptive card not displaying on MS Teams

Open EnnamGopaulen opened this issue 9 years ago • 8 comments

Bot Info

  • App ID: 987f751d-6231-469e-b3dd-cbb56e7f7893
  • SDK Platform: Node.js
  • SDK Version: 3.7.0
  • Active Channels: MS Teams, WebChat
  • Deployment Environment: Azure App Service

Issue Description

The adaptive card is not displaying on MS teams but working well on emulator and WebChat .

Code Example

displayCustomerCreationForm = function (session, nom, ville) {
  if ((typeof session.message.value === 'undefined' || session.message.value === '')) {
    var outputCard = new builder.Message(session)
      .addAttachment({
        contentType: "application/vnd.microsoft.card.adaptive",
        content: {
          "type": "AdaptiveCard",
          "body": [
            {
              "type": "TextBlock",
              "text": "Nom du client"
            },
            {
              "type": "Input.Text",
              "id": "nom",
              "style": "text"
            },
            {
              "type": "TextBlock",
              "text": "Ville"
            },
            {
              "type": "Input.ChoiceSet",
              "id": "ville",
              "style": "compact",
              "isMultiSelect": false,
              "choices": [
                {
                  "title": "Paris",
                  "value": "Paris",
                  "isSelected": true
                },
                {
                  "title": "Marseille",
                  "value": "Marseille"
                },
                {
                  "title": "Lyon",
                  "value": "Lyon"
                }
              ]
            }
          ], "actions": [
            {
              "type": "Action.Submit",
              "title": "Valider",
              "data": { "btn": "form" }
            },{
              "type": "Action.Submit",
              "title": "Annuler",
              "data": { "btn": "cancel" }
            }]
        }
      });

Expected Behavior

This card should appear image

Actual Results

Nothing appear in MS Teams but displayed successfully on Emulator and WebChat.

EnnamGopaulen avatar Oct 16 '17 09:10 EnnamGopaulen

@EnnamGopaulen - Adaptive Cards are not yet supported in Microsoft Teams. We are working on support for Adaptive Cards and hope to have a date to share soon. It won't be before January 2018 but it is high on the list of next things to get to.

Wajeed-msft avatar Oct 16 '17 12:10 Wajeed-msft

@Wajeed Thanks for your reply

EnnamGopaulen avatar Oct 16 '17 12:10 EnnamGopaulen

@Wajeed-msft , Is it possible to use Adaptive Card now in Microsoft Teams?

on the visualizer it shows this is possible, however when I testing it, I could not see the calendar

Shon-Elias avatar Mar 09 '18 21:03 Shon-Elias

there's been a few dates @Shon-Elias and I think Q1 2018 was the initial date but not official date as of yet afaik.

brettmillerb avatar Mar 10 '18 12:03 brettmillerb

@brettmillerb Thanks for your reply.

I'm looking forward to using it in Microsoft Teams

Shon-Elias avatar Mar 22 '18 22:03 Shon-Elias

It currently says that Adaptive Cards are in Preview for MS Teams: https://docs.microsoft.com/en-us/adaptive-cards/resources/partners

Is there something that needs to be done to activate the preview? It does not seem to be working yet. @Wajeed-msft

talencity avatar Mar 26 '18 12:03 talencity

@talencity Thank you!

Shon-Elias avatar Mar 27 '18 06:03 Shon-Elias

@Shon-Elias

You might get a more accurate answer to your question here: https://github.com/Microsoft/AdaptiveCards/issues

EricDahlvang avatar Mar 27 '18 16:03 EricDahlvang