AdaptiveCard not working with incoming webhook

Microsoft

Anyone have any idea why webhook endpoint would be returning the following error? It seems I already have the type set and still get this error in the response with card actually being posted in teams. Seems to work fine with MessageCard though.

"AdaptiveCards.AdaptiveSerializationException: Property 'type' must be 'AdaptiveCard'"

Here is an example payload that still fails for me with same error message.

const payload = {
        type: 'message',
        attachments: [
            {
                contentType: 'application/vnd.microsoft.card.adaptive',
                contentUrl: null,
                content: {
                    $schema:
                        'http://adaptivecards.io/schemas/adaptive-card.json',
                    type: 'AdaptiveCard',
                    version: '1.6',
                    body: [
                        {
                            type: 'TextBlock',
                            text: 'Submitted response',
                        },
                    ],
                },
            },
        ],
    };

    axios
        .post(options.webhookUrl, payload)
        .then(function (response) {
            console.log(response);
        })
        .catch(function (error) {
            console.log(error);
        });



1 Reply

@miguelc21 - This issue is being tracked here. Please follow that thread for further updates.

Thanks!