Share via

Microsoft Teams produces 'SystemError' when receiving output from built in Azure Foundry Agent connection through Copilot Studio Orchestrator

Julien Ward 0 Reputation points
2026-04-16T17:15:10.9566667+00:00

Goal: Connect specialized Foundry Agents to Copilot Studio Orchestrator for seamless Teams and M365 Copilot integration of conversational Agents.

Environment:

  • Copilot Studio Orchestrator Agent connected to two specialized backend Foundry Agents through the built in connect to an external agent tab
    • Agents --> Add an Agent --> Connect to an external agent -->Microsoft Foundry
  • Copilot Studio Orchestrator Agent is published and added to M365 Copilot and Microsoft Teams channels.
  • Connect to an external agent Auth is through Microsoft Entra using makers credentials to prevent connection requests.

Simplified Error/Problem Explanation:

These errors DO NOT OCCUR in Copilot Studio Test Environment but in the published Teams/M365 Channel.

These errors only occur when the Copilot Studio Orchestrator Agent calls a backend Foundry Agent and the output is returned directly to Teams/M365. Queries exchanged directly with the Orchestrator work great and do not produce any errors.

  • Microsoft Teams Error: "Sorry, something unexpected happened. We’re looking into it. Error code: SystemError. Conversation ID:"
    • This will occur when the Foundry Agent returns its output to the Copilot Studio Orchestrator Agent. The returned Foundry Agent output is directly sent through to the Teams environment. This produces an error in Teams but not in the activity logs.
    • The agent assumes that the user has seen this output (because it does not receive the SystemError) and will not represent the output unless directly prompted in it's system instructions or by the user.
    • If told to re-present the backend Foundry output, the SystemError is still present but the agent will follow up with a summary of the output where it does not produce an error because it is coming straight from the Copilot Orchestrator.
  • M365 Copilot 'Error': "Sorry, I wasn't able to respond to that. Is there something else I can help with?"
    • Presents this message on every query that involves a backend Foundry agent call.
    • Will not automatically represent the data if instructed in the orchestrator instructions. Requires a manual request.

The problem seems to come from how backend Foundry Agents outputs are handled by Copilot Studio. Instead of passing through the orchestrator first, they are directly returned as an output (ideal in normal scenarios but not when it creates errors). This seems like it was designed this way because the Orchestrator Instructions do not control how the Foundry Agents output is presented.

This makes me believe that there is a problem with the raw Foundry Agent output being exposed to Teams and M365 Copilot. Since this built in connection type doesn't provide control over the output, like it does for Child Agents, I am unsure on how to solve this error.

Detailed Errors/Problem:

The Foundry Agent connections return a 'text'/json output to Copilot Studio Orchestrator on request. In the activity logs it shows that Azure AI Foundry automatically returns the data. The Copilot Orchestra Agent knows that this data was presented. The problem is that on the users end in Teams or M365 Copilot we don't see this data but instead receive an error. We can see the Foundry Agent outputted data in logs or in the 'Test your agent' environment in Copilot Studio but it does not appear in Teams or M365. Instead it throws a system error which the orchestrator agent does not receive since it is coming from Teams.

Microsoft Teams Error:

"Sorry, something unexpected happened. We’re looking into it. Error code: SystemError. Conversation ID:"

This error is produced in Teams and not from the backend Foundry agent output. You must prompt the orchestra agent to reproduce the output from the backend Foundry agent and it will produce it properly as a summary. The raw output from Azure Foundry through the built in connection is not compatible with Teams or M365.

The connection type between Foundry and Copilot is in preview, therefore this might be a temporary bug but there is no thread or documentation about this lack of functionality or error. The system error is documented but does not include this problem or a fix for it.

M365 Copilot 'Error':

"Sorry, I wasn't able to respond to that. Is there something else I can help with?"

M365 will automatically return this message when prompting a backend Foundry Agent. It will continue returning this with each query until Copilot Studio is finished calling the Foundry Agent. Then it will also assume that the data was presented (since it has it in it's activity logs but fails to present it on the UI). The only way to get it to present the data is to ask the agent to represent the data it just grabbed or found. It will not do this automatically (where it must be present in instructions) like in Teams.

You don't see these errors in the test environment in Copilot studio and originally the backend Foundry Agent information was being presented to the 'Test your agent' environment. My assumption is that there is a problem between Teams and M365 and Foundry output. I have found no work around in M365 but it seems like in Teams you can emphasize in the instructions that the orchestrator agents need to reproduce the output from the backend agent. It will then produce the provided error then produce a summarized version of the backend agent output.

Attempted Fixes:

  • Adjusted system prompt to not present Foundry data, represent Foundry data when ever it receives it (produces error but displays output)
  • Change Foundry Agent output from text to json, testing different formats.
  • Attempted to create other Copilot Agents to accept the Foundry output and connect those to the orchestrator.
  • Republishing
  • Removing and adding the Teams/M365 Copilot Channel
  • Removing and adding Agent in Teams Admin Section
  • Simplifying the backend Foundry Agent

Additional Material:

There seems to be some guides on setting up this connection but non that actually include an actual implementations with provided channels. Any suggestions or guidance on how to get rid of this system error or control the Foundry connection output would be greatly appreciated. Happy to answer any questions! Thanks.

Azure AI Bot Service
Azure AI Bot Service

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

0 comments No comments

2 answers

Sort by: Most helpful
  1. SAI JAGADEESH KUDIPUDI 2,625 Reputation points Microsoft External Staff Moderator
    2026-04-25T19:14:02.0966667+00:00

    Hi Julien Ward,

    Thanks for the detailed write-up — it really helps narrow this down.

    From what you’ve described, your configuration and testing approach look solid. The behavior you’re seeing is consistent with a known limitation in the current preview integration between Azure AI Foundry agents and Copilot Studio when responses are surfaced through channels like Microsoft Teams and M365 Copilot.
    What’s happening

    In short:

    • The Foundry agent is returning a valid response (confirmed by logs and Test environment)

    However, in Teams/M365 channels, that raw response is passed through directly and fails at the client rendering layer, resulting in the SystemError

    This explains why:

    • It works in Copilot Studio Test
    • It fails only in Teams/M365 UI

    The orchestrator assumes the response was delivered (since backend succeeded)
    Recommended approach

    Since the issue is related to how responses are rendered in the channel, the most reliable workaround today is to avoid sending raw Foundry output directly to Teams and instead ensure it is always transformed into a channel-safe format.
    Force response transformation in the orchestrator

    Update your Copilot Studio instructions so that:

    Any response received from an external (Foundry) agent must be reformatted or summarized before being returned to the user.

    This ensures:

    • Only plain text / simplified output is sent to Teams

    Avoids unsupported payload structures that trigger SystemError
    Introduce a “child agent” as a formatting layer

    Instead of connecting the orchestrator directly to the Foundry agent:

    Orchestrator → Child Agent → Foundry Agent
    

    The child agent can:

    Normalize the response

    Strip unsupported structure

    Return clean, channel-compatible output

    This gives you more control than the current direct external agent connection (which is still in preview).
    Additional best practices

    • Keep responses concise and text-based (avoid complex JSON or rich structures)
    • Limit overly large payloads

    If using JSON, ensure it is **flattened and minimal
    **Important note

    At this time, this behavior is not caused by a misconfiguration, but rather by:

    • Preview limitations of the external agent connection

    Channel-specific rendering constraints in Teams/M365

    Conclusion

    The most effective way to stabilize your scenario today is to ensure all Foundry responses are reformatted by the orchestrator (or an intermediate agent) before being sent to Teams/M365.

    This approach avoids the rendering issue and provides consistent behavior across channels, even with the current preview limitations.
    Microsoft documentation

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
    Please do not forget to "Accept Answer" and "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.


  2. Amira Bedhiafi 41,386 Reputation points MVP Volunteer Moderator
    2026-04-16T18:46:23.04+00:00

    Hello Julien !

    Thank you for posting on MS Learn Q&A.

    Connecting Microsoft Foundry agents to Copilot Studio as external agents is still public preview and in the documentation yiou can see that says preview features can have restricted functionality and aren’t meant for production use.

    Also for the Teams channel specifically you can expect the SystemError message after publish or republish and it can happen when Teams continues using an older cached configuration of the agent.

    As a workaround here you need to disable and reenable the app in Teams admin center, remove and readd the Teams channel in Copilot Studio then republish and if it still happens you may need to open a ticket and the support team will assist you.

    Another thing is Microsoft 365 Copilot and Teams have channel specific rendering limitations like including unsupported message/node types and M365 Copilot strips or blocks some content types.

    For Copilot Studio agents in Microsoft 365 Copilot, unsupported message types include basic cards, video, image, file and speech and some node types are unsupported as well.

    For Foundry agents published to Teams/M365, published agents currently don’t support streaming responses or citations in those channels.


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.