Forum Discussion
troyhart
Jan 16, 2024Copper Contributor
Posting adaptivecard to teams incoming webhooks
I have encountered a strange issue that I cannot get past. It has to do with MS Teams incoming webhooks and AdaptiveCards. The issue is that webhooks on some (not all) channels have stopped working. ...
Meghana-MSFT
Microsoft
Jan 17, 2024Thank you for reporting this, we will check this and get back to you.
Meghana-MSFT
Microsoft
Jan 17, 2024troyhart - We checked the payload with `actions`. We also got Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2 error. We see that
height property accepts "auto" or "stretch". After changing the height value from automatic to auto/stretch, JSON is working fine.
Please change this value to "auto" or "stretch" and try to send the payload again. Please confirm if this helps?
- troyhartJan 19, 2024Copper Contributor
Thank you! That worked. It's interesting to note that the invalid height value does not consistently break the POST. I have some channels that continue to accept the POST with a height of "Automatic". Also, the channels whose webhooks are consistently not accepting the POSTs now did accept them at one time.
- Meghana-MSFTJan 22, 2024
Microsoft
troyhart - Glad your issue has been resolved. Kindly share your feedback via Microsoft Teams Developer Feedback link. We see that invalid height value breaks consistently. We checked by giving heigh value as "Automatic" and it is failing every time. We tried to send the card to multiple channels.
- troyhartJan 22, 2024Copper Contributor
This simply wasn't my experience. I have one notification process and it uses a data model that has the height attribute hard coded to "Automatic". So, I know for certain that each notification I POSTed always had a payload with that invalid height attribute value. However, only webhooks on certain teams channels would produce an error, others would happily accept the "bad" payload.