Teams Bot Error - Failed To Send (Invalid member in the thread)

Posted on January 22nd, 2020

So this falls into the class of "I'm blogging this for when (not if) it happens to me in future, but maybe it can be helpful to someone else" category. I started deploying a bot a few weeks ago into another environment (staging) but then got busy with other work and forgot about it. I'd done the initial deployment with Terraform, before I started working on a PR for the project to add the Teams channel support to Bot Framework bots, and so in the end I never added the Teams channel.

As a result, when I came back to work on the bot today, and deployed my manifest into Teams, I got the following error:

Failed To Send Error

Aside from "Failed To Send Error" within Teams, when I used the browser debug tools to investigate I got an error 205 "Invalid member in the thread", as shown below.

Invalid member in the thread Error

This made me think that just Teams was unable to communicate with the Bot. In fact, I had a pretty good idea that the Bot was in fact fine, as it was a "staging" version of exactly the same code I had running elsewhere. I check the host environment, to confirm, but all was fine, so then I checked the "Test in Web Chat" in the Azure Bot registration, and that was fine too - that confirmed it - the BOT was fine, but BOT <-> TEAMS was not fine. I went to check the Channels and, lo and behold, Teams was missing as a Channel. I fixed it, but in case you get this error, check your Channels registration in Azure for your Bot, it should appear as below:

Teams Channel Registration

Hope that helps someone else as well.

-- Hilton