Microsoft Teams Azure Bot Not Receiving Messages Despite Correct Configuration
I am experiencing an intermittent issue where our Microsoft Teams bot does not receive messages from the Teams client. Despite the bot being fully functional in Direct Line and Web Chat channels, the Teams integration fails to send requests to our bot's messaging endpoint.
This issue has occurred multiple times across different bot resources, and while recreating the Azure Bot resource and app registrations temporarily resolves the problem, it reoccurs shortly after. Notably, I have two bots (one for production and one for development) with identical configurations and source code; however, only one of them currently works in Teams, while the other does not.
Error Details:
- Teams Client Logs:
- No registered active worker for user ID
- TimeoutRunningApp with previousStep: RenderStarted
- Azure Bot Logs:
- Our bot application does not show any logs indicating that Teams is attempting to send requests to the bot's /api/messages endpoint when the issue occurs.
- Manifest and Configuration:
- The Teams app manifest has been validated and is configured correctly, including the bot ID, valid domains, and endpoint.
- The Azure Bot Service messaging endpoint is set to the correct URL and works in other channels.
- The Teams app manifest has been validated and is configured correctly, including the bot ID, valid domains, and endpoint.
- No registered active worker for user ID
Troubleshooting Steps Taken:
- Verified Configuration:
- Confirmed that the bot's App ID, secret, and tenant ID are correctly configured in Azure and match the Teams manifest.
- Validated the Teams app manifest and ensured it aligns with the bot registration.
- Endpoint Testing:
- Confirmed that the /api/messages endpoint is live and responds as expected.
- The bot works flawlessly in Direct Line and Web Chat, but Teams does not send any requests to the bot.
- Confirmed that the /api/messages endpoint is live and responds as expected.
- Confirmed that the bot's App ID, secret, and tenant ID are correctly configured in Azure and match the Teams manifest.
- Recreated Resources:
- Deleted and recreated the Azure Bot resource, app registrations, and Teams app. This temporarily resolved the issue, but it reoccurred for one of the bots.
- Deleting the Teams channel and re-registering it does not fix the issue.
- I also tried creating a new Teams app package, but the issue persisted.
- Testing Across Framework Versions:
- I attempted using both the TypeScript and Python versions of the Bot Framework SDK. The issue occurs with both implementations, which indicates it may not be related to the bot's source code.
- Similar Issues Reported by Others:
- I found reports on Microsoft forums of other developers facing the same issue. Many were able to resolve it by recreating all resources (bot registrations, Teams app packages, etc.) from scratch. However, this solution is not sustainable as the issue tends to reoccur after some time.
- Network and Health Checks:
- Verified network connectivity and ensured no firewall, VNET, or NSG rules are blocking Teams traffic.
- The /health endpoint responds with HTTP 200 as expected.
- Verified network connectivity and ensured no firewall, VNET, or NSG rules are blocking Teams traffic.
Request for Help:
- Why does the Teams client not send messages to the bot endpoint despite correct configuration?
- Are there any known issues with Teams caching bot configurations or intermittently losing connectivity with the Azure Bot Service?
- Can someone help investigate the "No registered active worker" error and "TimeoutRunningApp" in Teams logs? I would appreciate any guidance or advice on resolving this issue. Thank you!