web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Teams channel produces...
Copilot Studio
Suggested Answer

Teams channel produces 'SystemError' from Foundry Agent connection through Copilot Orchestrator

(0) ShareShare
ReportReport
Posted on by

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.

I am most curious about the standard for connecting Foundry agents to a Copilot Studio Orchestrator. Is there a standard practice to do this or is this preview connector the only current available functionality to implement this? 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.

I have the same question (0)
  • Suggested answer
    Assisted by AI
    Elliot Margot Profile Picture
    10 on at

    You've already nailed the diagnosis. The Connect to an external agent > Microsoft Foundry path (still in preview as of April 2026) is an A2A-style passthrough: Foundry's reply is forwarded to the channel without the Copilot Studio orchestrator reformatting it. That's why it works in the Test pane (CS test renderer is permissive) and fails in Teams/M365 (Bot Framework outbound formatter is strict). Orchestrator instructions can't change this on the preview path because the orchestrator never gets a chance to rewrite the Foundry payload.

    Three concrete things:

    1. Don't use the external-agent path for production Teams/M365 channels yet. Wrap the Foundry agent inside a topic instead: add a Send HTTP request node (or a Power Automate flow) that calls your Foundry agent endpoint, capture the response into a variable, then use a Send a message or Generative answers node where you control the formatting (plain markdown, no citations, no code blocks unless needed). This puts the orchestrator back in charge of the channel-bound payload. Slightly more setup, but it removes the entire class of SystemError you're seeing.
    2. Hook Application Insights to the agent (Settings > Advanced > Application Insights). The published Teams channel writes the underlying exception into the dependency telemetry, you'll see the real reason (size limit, malformed adaptive card, unsupported element, schema version). The "SystemError" string in Teams is the channel's generic catch-all. The Learn doc you linked is a different SystemError class, that's a publish-time provisioning error, not your channel-time payload one.
    3. The TechCommunity blog is pre-preview-connector, so the integration mechanism is outdated, but the sanitization principle still applies: assume Teams will reject anything that isn't plain text or basic markdown, and let CS (not Foundry) own what reaches the channel.

    If you want to keep the external-agent path, the only mitigation today is to constrain the Foundry agent's system prompt to emit plain markdown (no citations, no JSON blocks, no inline images, no Adaptive Card JSON, output under ~5 KB). It still won't be 100% reliable on the preview connector, but it cuts the failure rate sharply. Wrapping in a topic is the more durable fix.

    Hope this helps. Happy to compare notes if you find a Foundry response shape that consistently survives the preview passthrough.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 550

#2
Vish WR Profile Picture

Vish WR 191

#3
Haque Profile Picture

Haque 184

Last 30 days Overall leaderboard