SOLVED

Refresh Card not working?

Copper Contributor

I have a dotnet core web api that receives an action from an incoming web hook.  It is an HTTP Post action on the web api that does some work and I want to reply to the message card using the refresh card.

[HttpPost]
public async Task<ActionResult> Post()
{

// do work here, validate, etc.. perform action

Response.ContentType = "application/json; charset=utf-8";
Response.Headers.Add("CARD-ACTION-STATUS", "Plan is being created.");
Response.Headers.Add("CARD-UPDATE-IN-BODY", "true");
return Ok();

}

When I do this on the controller action, the Teams message card from the incoming web hook reads:

 

Failed to send

Plan is being created.

 

So I can tell Teams is getting the refresh data to update the card body but its not doing it and I cannot seem to figure out why.

3 Replies
best response confirmed by Paul Dietrich (Copper Contributor)
Solution

Fixed this by posting a JSON card back with the refresh card headers.

Could you let me know which headers you had to add. I am facing a similar issue
From your post I understand that there is an incoming webhook to YOUR application. What was your Microsoft Teams connector? Was that an incoming webhook to Teams?
1 best response

Accepted Solutions
best response confirmed by Paul Dietrich (Copper Contributor)
Solution

Fixed this by posting a JSON card back with the refresh card headers.

View solution in original post