Building and customizing solutions using Microsoft 365 Copilot APIs and tools
“Text not extracted” in Microsoft 365 Copilot when using a Foundry/Agents-based bot is consistent with a rendering/feature limitation in the Microsoft 365 Copilot surface rather than a problem with the agent’s internal reasoning or tools.
From the provided information:
- The agent runs correctly in Foundry and in other published channels.
- Tool calls complete successfully and logs show a proper response.
- The problem appears only in the Microsoft 365 Copilot/Teams Copilot experience, which uses the Bot Service integration created from Foundry.
Microsoft 365 Copilot has several limitations for custom/agent-based experiences that affect how responses are surfaced:
- For agents published to Microsoft 365, streaming responses and citations are not supported, and file uploads/image generation do not work in that surface.
- For custom engine agents in Microsoft 365 Copilot, HTML in response messages is not supported, messages are immutable, and rich cards and several Adaptive Card elements are not supported.
When a bot/agent returns content that relies on unsupported message formats (for example, HTML formatting, unsupported rich cards, or unsupported Adaptive Card elements), the Copilot host can fail to render the content correctly. In such cases, the host may show a placeholder instead of the actual text, which matches the “Text not extracted” symptom.
To mitigate in this scenario:
- Ensure the agent’s final response is plain text only when targeting Microsoft 365 Copilot. Avoid HTML, rich cards, or Adaptive Card elements that are listed as unsupported.
- If using tools that return structured or card-based payloads, have the agent transform those tool outputs into a simple textual summary before returning the final message.
- Avoid relying on streaming or citations in the published agent, since these are not supported for agents in Microsoft 365.
- If the agent is implemented as a custom engine agent, design responses to align with the Microsoft 365 Copilot limitations (no HTML, no unsupported rich card types, no dynamic Adaptive Card refresh, etc.).
Because the agent already works correctly in Foundry and other channels, the core logic and tools do not need changes; the adjustment should focus on simplifying the response format so that it conforms to what Microsoft 365 Copilot supports.
References: