Forum Discussion

Paul Dietrich's avatar
Paul Dietrich
Copper Contributor
Jan 27, 2020
Solved

Refresh Card not working?

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

  • skysharma's avatar
    skysharma
    Copper Contributor
    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?
  • Paul Dietrich's avatar
    Paul Dietrich
    Copper Contributor

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

    • vimil's avatar
      vimil
      Copper Contributor
      Could you let me know which headers you had to add. I am facing a similar issue

Resources