What platform is your issue or question related to? (Delete other platforms).
v4
When returning a AdoptiveCard attachment to MS Teams client I am getting an error - "Operation returned an invalid status code 'BadRequest' ". The same adaptive card is getting successfully rendered in emulator but failing in Teams. I was not able to check developer preview in teams(due to accessibility issue) ,but I am guessing it is occurring in the server end.
Card is not getting displayed and throwing the error
Card is getting displayed but throwing the error as well.
_Note - I have attached one zip file containing two card responses , which is working as expected in emulator as well as adaptive card visualizer section, but throwing error in Teams_
Facing the same issue, in Action.Submit, adaptive card working fine in bot emulator but giving "400: Bad Request" error in MSTeams.
@shalinijoshi19 please assign this to @Wajeed-msft
Thanks @siduppal ; Done (@Wajeed-msft FYI) ; Btw do we want to keep this in the AC repo or transfer over to your end? If so, could you let us know the right repo to use and I'll get that taken care of as well ? Thanks!
Hi, Any updates on this? :)
This issue has been automatically marked as stale because it has not had any activity for 5 days.
This issue has been automatically marked as stale because it has not had any activity for 5 days.
Have the same problem with all adaptive cards
Same issue with the latest version of adaptive cards here; is there any progress on this?
Sorry, I missed this thread.
Could you please try the same JSON directly using App Studio's Card Editor section?

Let me know if you see any error. If you don't see any error, then please share the code snippet which you are using to send the Adaptive Card.
Hi @Wajeed-msft, I tried it in the App Studio and also on https://adaptivecards.io/designer/
Both work. Also sending it to myself via the App Studio card designer works.
It does not work in Teams directly. I'm also having a hard time finding any information about it in application insights; is there any way to debug this in teams?
The card in question:
adaptive_card.json.txt
This is the only 400 I can find in ai:

Hi @WizX20 - I tried the JSON which you shared and was able to send card successfully from code.

Could you please try this code locally using ngrok?
var cardJson = System.IO.File.ReadAllText("AdaptiveCard.json");
AdaptiveCardParseResult resultCard = AdaptiveCard.FromJson(cardJson);
// Get card from result
AdaptiveCard card = resultCard.Card;
var reply = activity.CreateReply();
reply.Attachments.Add(
new Microsoft.Bot.Connector.Attachment()
{ ContentType = AdaptiveCard.ContentType, Content = card });
try
{
await context.PostAsync(reply);
}
catch (Exception ex)
{
Console.WriteLine(ex);
// throw;
}
Please use channel specific data payload in adaptive card.
"data": {
"msteams": {
"type": "messageBack",
"displayText": "I clicked this button",
"text": "text to bots",
"value": "{\"bfKey\": \"bfVal\", \"conflictKey\": \"from value\"}"
},
"extraData": {}
}
reference link
That works for me over teams.
@WizX20 - Did you get chance to try out the code? Can we consider this issue closed?
@Wajeed-msft Hi, my issue was resolved by ditching the background images and reverting to a simpler version of the schema for cards. So, you can close this issue if you like.
Is it fixed? I'm not sure, I still think there are some issues with Adaptive Cards in MS Teams, but I guess those will get resolved over time.