Teams is not displaying my unfurl response

Cameron Nokes 1 Reputation point
2021-12-16T16:42:53.403+00:00

I have a Teams integration with link unfurling set up. I have the messaging endpoint pointed to a public ngrok URL and ngrok proxying a local node.js server that returns the example payload Microsoft has in it's documentation.

This is my endpoint (express.js):

app.post('/bot-test', (req, res) => {
  res.send({
    "composeExtension": {
      "type": "result",
      "attachmentLayout": "list",
      "attachments": [
        {
          "contentType": "application/vnd.microsoft.teams.card.o365connector",
          "content": {
            "sections": [
              {
                "activityTitle": "[85069]: Create a cool app",
                "activityImage": "https://placekitten.com/200/200"
              },
              {
                "title": "Details",
                "facts": [
                  {
                    "name": "Assigned to:",
                    "value": "[Larry Brown](mailto:larryb@example.com)"
                  },
                  {
                    "name": "State:",
                    "value": "Active"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  });
});

When I post a URL in a message in Teams, I see it POST to that endpoint and it responds without errors, but nothing shows up in Teams. What's going wrong? I can't find any logs on Microsoft's side either. I would expect that Teams renders a card with the response payload.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,716 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,021 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,740 questions
{count} votes