Azure AI Foundry Agent works in Playground but fails in Microsoft 365 Copilot when using Knowledge Base

Paul Satterlee 20 Reputation points
2026-06-11T18:13:35.7133333+00:00

I have an Azure AI Foundry Agent that uses a Knowledge Base connected to an Azure AI Search index.

The agent works correctly in:

  • Azure AI Foundry Playground

Azure App Service hosted web application

SharePoint page with embedded web application

I have also published the agent to Microsoft 365 Copilot.

A simple test agent (no tools, no knowledge base) works correctly in Copilot.

However, when using the Knowledge Base-backed agent in Copilot:

The user message is received successfully.

Foundry Traces show the knowledge base retrieval tool executes successfully.

Foundry Traces show the LLM generates a final response successfully.

The expected response is visible in the Trace User View.

Copilot does not display the response and instead shows a generic error message such as "Sorry, something went wrong."

The traces show:

Execute Tool = Success

Chat/LLM = Success

Final response generated

Has anyone encountered issues where a Foundry Agent with an Azure AI Search Knowledge Base works correctly in Playground but the generated response is not rendered in Microsoft 365 Copilot?

Are there known limitations, response formatting requirements, citation requirements, or knowledge base configuration settings that could cause this behavior?I have an Azure AI Foundry Agent that uses a Knowledge Base connected to an Azure AI Search index.

The agent works correctly in:

Azure AI Foundry Playground

Azure App Service hosted web application

SharePoint page with embedded web application

I have also published the agent to Microsoft 365 Copilot.

A simple test agent (no tools, no knowledge base) works correctly in Copilot.

However, when using the Knowledge Base-backed agent in Copilot:

The user message is received successfully.

Foundry Traces show the knowledge base retrieval tool executes successfully.

Foundry Traces show the LLM generates a final response successfully.

The expected response is visible in the Trace User View.

Copilot does not display the response and instead shows a generic error message such as "Sorry, something went wrong."

The traces show:

Execute Tool = Success

Chat/LLM = Success

Final response generated

Has anyone encountered issues where a Foundry Agent with an Azure AI Search Knowledge Base works correctly in Playground but the generated response is not rendered in Microsoft 365 Copilot?

Are there known limitations, response formatting requirements, citation requirements, or knowledge base configuration settings that could cause this behavior?

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

Answer accepted by question author
Jose Benjamin Solis Nolasco 11,946 Reputation points Volunteer Moderator
2026-06-12T01:58:12.7833333+00:00

Welcome to Microsoft Q&A

Hello Paul Satterlee,

You have run into a documented architectural limitation regarding how Microsoft 365 Copilot renders payloads from Azure AI Foundry agents.The reason your trace shows Chat/LLM = Success but the Copilot UI throws a "Sorry, something went wrong" error comes down to citations and streaming.

  1. Copilot enforces a stricter rendering pipeline than the Foundry playground; an agent can complete tool calls and LLM steps in Foundry traces yet still be rejected by Copilot at render time if the final payload uses unsupported features.
  2. Foundry IQ knowledge sources are separate from Copilot’s native knowledge sources; retrieval results and citation metadata produced by Foundry may not map to Copilot’s expected rendering model.
  3. Community reports and technical notes also list token/system‑prompt differences and other platform limitations that can change behavior between environments.

When your Knowledge Base retrieval tool executes, the LLM processes the injected context and typically formats its final response with grounding citations (footnotes) and attempts to stream the output. However, according to the official Publish agents to Microsoft 365 Copilot documentation, published agents do not support streaming responses or citations within the Microsoft 365 Copilot canvas.

When the Copilot rendering engine receives the Foundry-formatted payload containing citation metadata or a streaming flag, it fails to parse the structure. Instead of failing gracefully, it aborts the UI render entirely, resulting in the generic error message you are seeing.

Attribute Foundry Playground Microsoft 365 Copilot (published agent)
Supported Not supported. Can break rendering.
-------- --------
Streaming responses Supported Not supported. Can break rendering.
Citation rendering Flexible (shows citations) Limited / unsupported formats; may cause errors.
File/image uploads Works in hosted apps Not supported in Copilot published agents.
Foundry IQ vs Copilot KB Native Foundry IQ sources Separate; not interoperable.

To get your Knowledge Base agent working in Copilot, you must strip out the unsupported metadata before the payload hits the Copilot UI.

  1. Simplify the final response — return plain, non‑streamed text with no embedded citation blocks or HTML. If Copilot shows the answer, the issue is rendering.
  2. Disable streaming and citation output in the agent’s response template or post‑processing step. Copilot does not support streaming or some citation formats for published agents.
  3. Strip tool metadata (source URLs, JSON blobs, attachments) from the final message; include only the human‑readable answer.
  4. Test retrieval settings — set retrieval reasoning to minimal/low and return only the synthesized answer (not raw document extracts).
  5. Reduce token footprint and avoid hidden system prompt expansions that may push payloads over Copilot limits.

By forcing the agent to return a single, plain-text block without citation tags, Microsoft 365 Copilot will be able to render the response successfully.

😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-06-11T18:14:07.1466667+00:00

    Published agents that use knowledge bases can behave differently in Microsoft 365 Copilot than in the Azure AI Foundry playground because of current platform limitations and how responses are rendered.

    From the documented limitations for agents published to Microsoft 365 Copilot and Teams:

    • Streaming responses and citations are not supported for published agents in Microsoft 365 Copilot.
    • File uploads and image generation also do not work for agents published to Microsoft 365.

    If the agent’s response format relies on capabilities that are not supported in Microsoft 365 Copilot (for example, streaming-style responses or citations formatted in a way that Copilot expects but the platform cannot render), Copilot can fail to display the final answer even though the tool execution and LLM steps succeed in Foundry traces.

    Additionally, there is a separation between Copilot knowledge sources and Foundry IQ knowledge sources:

    • Foundry IQ knowledge sources and Microsoft 365 Copilot knowledge sources are not interoperable. Foundry IQ knowledge sources cannot be used as Copilot knowledge sources, and vice versa.

    This means the knowledge base configuration that works in the Foundry playground is not treated as a native Microsoft 365 Copilot knowledge source. When the agent is published into Microsoft 365 Copilot, the platform applies its own constraints on how responses (including any retrieval-based content) are surfaced. Under these constraints, certain response structures or metadata (such as unsupported citation behaviors) can cause Copilot to show a generic error instead of the LLM’s final text.

    Given the documented behavior:

    • Ensure the published agent does not depend on streaming responses or citations when used in Microsoft 365 Copilot.
    • Treat the Foundry knowledge base as an internal retrieval mechanism for the agent, but design the final response so that it is a plain, non-streaming text answer without relying on Copilot-specific citation rendering.

    If a simple agent without a knowledge base works in Copilot but the knowledge base–backed agent does not, the most likely cause is that the response (or associated metadata such as citations) is hitting one of these limitations when rendered in Microsoft 365 Copilot, even though the same response is valid in the Foundry playground.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer 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.