MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
288 stars 511 forks source link

Adaptive Cards support by Incoming Webhook #4109

Open sergey-tihon opened 3 years ago

sergey-tihon commented 3 years ago

Is adaptive cards really already supported by Incoming Webhook?

When I try to send sample json from docs

curl -H 'Content-Type: application/json' https://<domain>.webhook.office.com/webhookb2/<guid>@<guid>/IncomingWebhook/<id>/<guid>  -d @card.json

server resond with 200 OK but body is

Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId MS-CV=YmwkX6wYT0m/8+WG4IPSeQ.0..%   

and no message delivered.

In all other docs it is clearly mentioned that Adaptive cards are not supported.

Learn module says that

image

Legacy actionable message card reference

image


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Prithvi-MSFT commented 3 years ago

Hi @sergey-tihon, Yes adaptive cards are supported in incoming webhooks. We tried the same example you mentioned on postman and the card was sent successfully without any error. Can you try on postman and let us know if you are able to send ?

Thanks

sergey-tihon commented 3 years ago

Just tried once again with newly created webhhook and it works indeed!

  1. Can it behave differently with old webhooks? (Created year or few years ago, but already in new format with tenant name)
  2. Can you please update Learn module and Note in legacy doc accordingly?
ChetanSharma-msft commented 3 years ago

@sergey-tihon - This is related to document enhancement so redirecting to them.

surbhigupta12 commented 3 years ago

@andrewconnell-msft

This is to be updated in learn module. Could you please look into it.

ChetanSharma-msft commented 3 years ago

@andrewconnell-msft - Please let us know once the contents are updated so that we can close this issue.

andrewconnell-msft commented 2 years ago

Thanks @v-chetsh ... my team will get this updated in our next refresh of this module (~late FEB/early March 2022)

andrewconnell-msft commented 2 years ago

This is addressed in https://github.com/MicrosoftDocs/learn-m365-pr/pull/4589

Weatwagon commented 2 years ago

Would there be a limitation on GCC tenants for this to work. I've tried adding the connector fresh to a new channel and multiple example json payloads and I'm only getting the following when trying to use adaptive cards Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400

If I use legacy cards or just plain {"text": "Hello World"} the connector works fine.

ChetanSharma-msft commented 2 years ago

We will check on it from our end and get back to you.

Nivedipa-MSFT commented 2 years ago

@Weatwagon - We already have ICM raised for this. We will let you know once we have any update.