Share via

Bot Framework dropped/delayed messages from Teams

Matt Williams 40 Reputation points Microsoft Employee
2026-03-16T07:06:52.9+00:00

We have a number of Teams channels containing a bot, which is backed by the Azure Bot service, which is backed by an Azure Web App written in Python using the Bot Framework SDK v4. This was generally working correctly until 07:17 UTC on Wednesday 11 March, and then all actions started being responded to with Teams' generic "something went wrong" error message, and no requests reached our Web App (all logs stopped). According to the Web App, it did not suffer an outage at that time. At 07:30 UTC, service recovered.

Interestingly, at 07:30 UTC, the Web App received a message that our users tell me was sent some minutes earlier, but the timestamp in the Activity JSON body is for 07:30. To me, this suggests that the issue was not with connectivity between the Bot Service and the Web App, but that the Bot Service was not processing messages from Teams in that window.

The rate at which we were sending messages was low (no more than 1 message every 10-15s), so we should not have been hitting any rate limits, and didn't see any logs relating to that.

The system is now recovered, but I'm keen to understand how we avoid this happening again. I'd also like to know if there are ways that, if this does happen, messages can be dropped rather than delayed - there are circumstances in which a delayed message might have a worse effect on our system than an entirely-dropped one.

I tried looking at the Kusto queries at https://learn.microsoft.com/en-us/azure/bot-service/monitor-bot-service?view=azure-bot-service-4.0#kusto-queries, but these didn't give any results at all, even when I reduced filtering, so maybe Kusto logging is disabled in some way for my Bot Service - is that possible?

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.


Answer accepted by question author

  1. SRILAKSHMI C 18,035 Reputation points Microsoft External Staff Moderator
    2026-03-16T12:38:07.89+00:00

    Hello Matt Williams,

    Welcome to Microsoft Q&A and Thank you for the detailed timeline and observations.

    Based on the behavior you described, it does appear that the issue likely occurred upstream of your Web App, since:

    • Your bot did not receive any requests during the incident window

    Teams users saw the generic “something went wrong” error

    Your App Service logs show no downtime

    A message that users sent earlier was delivered later with a new timestamp

    This pattern generally suggests a temporary disruption within the Microsoft Teams → Bot Framework channel infrastructure, rather than an issue with the bot’s hosting environment.

    What likely happened

    The message flow for a Teams bot typically looks like this:

    Teams client → Teams service → Bot Framework channel service → Azure Bot Service → your bot endpoint

    Because your Web App never received requests during the ~07:17–07:30 UTC window, it’s likely that the issue occurred within the Teams channel connector or Bot Service layer, where messages may have been temporarily queued or retried. Once the upstream service recovered, the messages were forwarded to your bot, which explains why you later received an activity with a new timestamp corresponding to the delivery time.

    Enable detailed logging for future troubleshooting

    To better understand events like this in the future, it would be helpful to enable diagnostic logging for your bot resource.

    In the Azure portal, open your bot resource.

    Go to Diagnostic settings.

    Enable Send to Log Analytics (or Storage/Event Hub if preferred).

    Once enabled, you should be able to run the Kusto queries provided in the documentation to see channel activity, request attempts, and response codes. If diagnostic logging is not enabled, those queries will return no results, which may explain what you observed earlier.

    Reference: Bot Service monitoring queries https://learn.microsoft.com/azure/bot-service/monitor-bot-service?view=azure-bot-service-4.0#kusto-queries

    Use Application Insights for end-to-end visibility

    It can also help to capture telemetry on both sides of the pipeline:

    Bot Service registration – link an Application Insights instance to capture channel connector traces.

    Your Web App – enable Application Insights to capture exceptions, request latency, and dependency calls.

    This makes it easier to correlate activity between the Teams channel layer and your bot backenMonitor service health

    Because incidents like this can sometimes originate in the platform layer, it is recommended to:

    Subscribe to Azure Service Health alerts in the Azure portal.

    Monitor the Azure status page for regional service incidents.

    These alerts can notify you if there are channel outages or service degradations affecting bots in your region.

    Handling delayed messages

    At the moment, Azure Bot Service does not provide a built-in mechanism to drop delayed messages at the channel level. Messages will generally be delivered once the service recovers.

    If delayed messages could cause issues in your system, a common mitigation is to implement a message staleness check in your bot code. For example:

    Inspect the activity.timestamp field in each incoming message.

    Compare it with the current server time.

    Ignore messages that exceed your acceptable age threshold (for example, older than 30–60 seconds).

    This effectively allows your bot to discard stale messages rather than process them after a backlog is cleared.

    The behavior you observed likely resulted from a temporary issue in the Teams → Bot Service channel pipeline, not your Web App.

    Diagnostic logs and Application Insights can help trace channel activity and delivery attempts.

    Azure Service Health alerts can notify you if similar platform incidents occur.

    Since Teams does not currently support message TTL for bots, you can add a timestamp check in your bot logic to ignore delayed messages.

    Please refer this

    1. Monitor Bot Service with Kusto: https://learn.microsoft.com/azure/bot-service/monitor-bot-service?view=azure-bot-service-4.0#kusto-queries
    2. General troubleshooting for Azure AI Bot Service bots: https://learn.microsoft.com/azure/bot-service/bot-service-troubleshoot-general-problems?view=azure-bot-service-4.0
    3. How to guarantee message delivery order: https://learn.microsoft.com/azure/bot-service/bot-service-troubleshoot-general-problems?view=azure-bot-service-4.0#how-can-i-guarantee-message-delivery-order
    4. Status codes & retry guidance for Teams bots: https://learn.microsoft.com/microsoftteams/platform/bots/build-conversational-capability?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#status-codes-from-bot-conversational-apis

    I Hope this helps. Do let me know if you have any further queries.

    Thank you!

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.