A family of System Center products for managing incidents and problems.
Inconsistent behavior — Teams bot not receiving “add to channel” event on first install
Tag : Microsoft Teams - Development
Hi Team,
While testing our Teams app (which includes a bot), we observed inconsistent behaviour during installation:
- Sometimes, when we add the app or add it to a channel for the first time, our backend service (bot endpoint) does not receive the expected trigger/event (such as the
conversationUpdateevent for “bot added to team”). - When we remove the app and re-add it (or add it to another channel), the events are delivered correctly, and our backend receives the trigger as expected.
We would like to understand this behaviour better and ensure reliable app installation. Could you please help clarify:
Under what conditions might the first “add to channel” or “install” event fail to reach the bot’s messaging endpoint?
- Is there any known propagation delay, caching, or timing issue between Teams and the Bot Framework service that could cause this intermittent behaviour?
Are there any recommended mitigations or retry mechanisms to ensure our backend always receives the installation event?
- How can we confirm that Teams successfully reached our backend endpoint during the install process?
- For example, is there any way to make Teams validate endpoint connectivity or wait for a success response before finalising the app installation? If the backend is unreachable or times out, can Teams prevent the app from being added, so users aren’t left with a half-setup state?
For context, our bot uses the TeamsActivityHandler framework with an Express backend, and the bot endpoint is hosted on [Azure/AWS/other] with HTTPS enabled.
Thank you for your continued guidance!
Best regards,
Venu