Share via

Azure AI Foundry Chat Bot Not working through Teams Chat Bot

JDA 0 Reputation points
2026-03-09T17:37:15.5033333+00:00

I have multiple agents that are working through Chat Interface but receving this error when accessing through Teams Chat Bot Encountered error=Encountered error of type invalid_request_error applied to param conversation with code conversation_not_found and message: Conversation with id 'conv_xxxxx' not found.. If issue persists, please use following identifiers in any support request: ConversationId = a:xxxf, activityId =

Can someone detail this issue or any steps that need to be completed to fix?

This appears to be a possible bug fix but I am still expereinceing this with multiple Agents.

Azure AI Bot Service
Azure AI Bot Service

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


1 answer

Sort by: Most helpful
  1. Anshika Varshney 9,825 Reputation points Microsoft External Staff Moderator
    2026-03-09T18:47:22.51+00:00

    Hi JDA,

    This behavior usually happens because the agent is being called in a different way when it runs in Microsoft Teams compared to the Foundry chat interface.

    When you test an agent in the Foundry chat or playground, Foundry automatically manages the conversation context for you. When the same agent is used through Teams, the request goes through Azure Bot Service first, and the conversation handling is stricter. If the conversation state is missing or expired, Teams returns a conversation not found error.

    A few things are worth checking.

    1. Confirm that the agent is correctly published to Teams using Azure Bot Service. The agent must be connected to a Bot Service channel, and the Teams channel must be enabled. If the agent works in Foundry chat but fails in Teams, it usually means the Bot Service layer is involved rather than the model or agent itself.
    2. Verify that conversation state is being preserved correctly. Teams expects each message to belong to an active conversation. If the bot or agent loses that context, Teams cannot find the conversation and throws a conversation not found error. This often happens if the agent execution takes too long or if conversation identifiers are not reused correctly between messages.
    3. Check managed identity and permissions. Teams bots run under the published agent application identity, which is different from the identity used in the Foundry playground. If permissions were granted only at the project level and not to the published agent identity, the bot may fail only in Teams.
    4. Keep agent responses fast and simple. Teams has tighter time limits than the Foundry chat interface. If the agent response takes too long, Teams may drop the conversation and report it as missing. Reducing tool calls and keeping responses efficient often helps stabilize Teams behavior.

    In summary, the agent itself is usually fine since it works in Foundry chat. The issue is typically related to conversation state handling, identity differences after publishing, or Teams timing constraints.

    Official reference:

    1. Test in Web Chat: https://docs.microsoft.com/azure/bot-service/bot-service-quickstart?view=azure-bot-service-4.0#test-the-bot-1
    2. Connect a bot to channels: https://docs.microsoft.com/azure/bot-service/bot-service-manage-channels
    3. Copilot Chat Plugin Returning 500: https://supportability.visualstudio.com/Modern%20Workplace/_wiki/wikis/Modern%20Workplace/1411401
    4. Troubleshoot 500-series errors: https://docs.microsoft.com/azure/bot-service/bot-service-troubleshoot-500-errors?view=azure-bot-service-4.0
    5. https://dotnet.territoriali.olinfo.it/en-us/microsoftteams/platform/bots/how-to/conversations/conversation-basics
    6. https://dotnet.territoriali.olinfo.it/en-us/azure/bot-service/bot-service-overview

    Do let me know if you have any further queries.

    Thankyou!


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.