Azure AI Foundry agent works in Playground but fails in Teams channel with "No tool output found" error

Theuns van Heerden 0 Reputation points
2026-04-28T11:22:09.9266667+00:00

My Azure AI Foundry agent works perfectly in the Foundry

Playground but fails when accessed through Microsoft Teams

or Copilot channels.

Error message in Teams:

"No tool output found for remote function call"

ConversationId: 19:aS5d2bCLqXuzoHOhM5voIAmKdigA-1ICXZ-WkjNqcxM1@thread.v2

ActivityId: 1777375148188

Setup:

  • Azure AI Foundry agent with Azure AI Search (Basic tier)
  • Azure Bot Service: moyo-hr-agent75540
  • Region: South Africa North
  • Search index: finalmoyorag-1776673238722

What works:

  • Agent responds correctly in Foundry Playground
  • Azure AI Search returns correct results
  • Direct Line and Teams channels both show Healthy

What does not work:

  • Teams channel returns error instead of answer
  • Copilot channel returns same error
  • Issue started around April 24 2026 after Foundry endpoint format changed

Foundry Activity Endpoint:

.../agents/moyo-hr-agent/protocols/activity

Azure Bot Messaging Endpoint was previously:

.../endpoint/protocols/activityprotocol?api-version=2025-11-15-preview

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-04-28T11:22:28.1333333+00:00

    The error "No tool output found for remote function call" when using the agent through Teams/Copilot indicates that the agent is invoking a tool (for example, Azure AI Search or a function tool), but the tool output is never returned back to the model in the follow‑up call.

    In the Foundry Playground this is handled automatically, but when the agent is exposed via Bot/Teams, the tool execution and the follow‑up responses.create call must complete correctly and within the run limits.

    Key points from the documented behavior:

    1. Tool output must be returned to the model
      • When the agent returns a function/tool call, the application must:
        1. Execute the tool (for example, call Azure AI Search).
        2. Call responses.create again with:
          • The tool output in the tool_outputs payload.
          • The previous_response_id set to the ID of the response that contained the tool call.
      • If this second call is missing or malformed, the system reports that no tool output was found.
    2. Run expiration and latency
      • Tool outputs must be returned before the run expires (10‑minute limit).
      • If the tool call or any downstream call (for example, to Azure AI Search) takes too long, the run expires and the tool output is rejected, which can surface as a missing tool output error.
      • For long‑running operations, the recommended pattern is to return a status and poll separately rather than blocking the run.
    3. Tool definition and JSON schema
      • If the tool schema is misaligned between the agent definition and the code that executes it, arguments may fail validation or parsing.
      • Invalid or unparsable arguments must be handled gracefully in the app; otherwise, the tool execution may never return a valid output to the model.
      • Ensure:
        • The function/tool is actually included in the agent definition.
        • Parameter schema types and required fields match what the code expects.
        • required properties are set and strict: true is used when stricter validation is needed.
    4. Teams/Copilot vs Playground behavior
      • The Foundry portal/Playground can show agents and simulate tool behavior, but the portal itself does not execute function calls. For production flows (such as via Bot Service and Teams), function calling must be tested and validated via SDK or REST.
      • If the Teams/Bot integration is wired to an older or incorrect endpoint, or if the code that handles tool calls was not updated after the Foundry endpoint format change, the second responses.create call with tool output may not be happening, leading to the "No tool output found" error.
    5. Recommended checks for this scenario
      • Verify that the Bot/Teams integration is calling the current Foundry activity endpoint and that the code path handling tool calls is still invoked after the endpoint change.
      • Add logging around:
        • The response that contains the tool call.
        • The execution of the tool (Azure AI Search call).
        • The follow‑up responses.create call, including previous_response_id and tool_outputs.
      • Confirm that the time between the tool call and the follow‑up responses.create is well under 10 minutes.
      • Validate the tool schema and arguments to ensure they are valid JSON and match the defined schema.

    If any of these steps fail (no follow‑up responses.create, expired run, or invalid tool output), the Teams/Copilot channel will surface an error indicating that no tool output was found for the remote function call.


    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.