1
votes

We are implementing search command for microsoft teams.

When composeExtension/query is invoked then bot returns list of attachments with previews that includes a Tap Tap = new CardAction { Type = "invoke", Value.... Like in this example https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/search-commands/respond-to-search?tabs=dotnet#response-example

After this teams shows search result. When user clicks on any result then bot is invoked with composeExtension/selectItem and returns new AdaptiveCard as result. Then teams shows this card but without app icon/title. Also following error is logged in teams

0-angular-jquery.min-eee9041.js:114 2021-01-15T16:29:22.175Z AppsService: getInstalledAppForUser - Invalid appId specified
(anonymous) @ 0-angular-jquery.min-eee9041.js:114
(anonymous) @ 3.2-app.min-e6c3257.js:1
...
Uncaught (in promise) Invalid appId specified

But when user submit this card then it's shown correctly (with app icon/title and etc). Can somebody help to fix this problem? Thanks in advance :)


This is the response for composeExtension/selectItem

{
  "composeExtension": {
    "attachments": [
      {
        "content": {
          "type": "AdaptiveCard",
          "body": [
            {
              "items": [
                {
                  "text": "Untitled task",
                  "type": "TextBlock"
                  ...
                }
              ],
              "separator": false,
              "type": "Container"
            }
            //...
          ],
          "actions": [
            {
              "url": "https://.....",
              "title": "View activity",
              "type": "Action.OpenUrl"
            }
          ],
          "version": "1.2"
        },
        "contentType": "application/vnd.microsoft.card.adaptive",
        "preview": {
          "content": {
            "title": "Preview"
          },
          "contentType": "application/vnd.microsoft.card.hero"
        }
      }
    ],
    "type": "result",
    "attachmentLayout": "list"
  },
  "responseType": "composeExtension"
}
1
Hi @Denis Borovnev, Will repro, check internally and let you know ASAP. - Mallipriya-MSFT
Just to confirm, have you tried this sample - Mallipriya-MSFT
Hi @Mallipriya-MSFT. I have very similar code to this sample, but here I return AdaptiveCard instead of ThumbnailCard. I tried ThumbnailCard and with it everything works fine, app icon and title are shown and there is no errors - Denis Borovnev
Also I'm using the same card for link unfurling and in this case it shown without errors and with app icon/title - Denis Borovnev
Here you can see the diff between the cards from link unfurling and search - Denis Borovnev

1 Answers

0
votes

Thank you for the Insights. We have raised a bug on the issue and it is being tracked internally.