Azure AI Foundry Agent: Function calling with require_approval=never not triggering tool execution in Teams channel

Jubin Soni 160 Reputation points
2026-06-28T00:05:48.7066667+00:00

I have a Foundry Agent published to a Microsoft Teams channel with require_approval="never" set. When I ask a question that should trigger a function call, the agent responds with a text answer instead of executing the registered function tool. The same agent works correctly when tested in the Foundry playground.

Environment:

  • Azure AI Foundry SDK: azure-ai-projects==1.0.0b11
  • Published channel: Microsoft Teams
  • Tool type: custom function tool
  • require_approval set to "never" at agent creation

What I've tried:

  • Verified the function tool is correctly registered and works in the Foundry playground
  • Confirmed require_approval="never" is set
  • Tested with multiple prompts that clearly match the function description

Is function calling behavior different when an agent is published to Teams vs the playground, and what configuration is needed to ensure tools are invoked correctly?

Thanks in advance!

Microsoft Foundry
Microsoft Foundry

A unified Azure platform for creating and managing AI models, agents, and applications with built‑in enterprise security, monitoring, and governance


Answer accepted by question author
Karnam Venkata Rajeswari 5,255 Reputation points Microsoft External Staff Moderator
2026-07-05T15:22:24.9433333+00:00

Hello @Jubin Soni ,

Welcome to Microsoft Q&A .Thank you for reaching out to us.

Based on the behavior described, the difference between the Playground experience and the published Teams channel appears to be related to the function-calling workflow is executed after publication, rather than the require_approval="never" setting itself. Function calling relies on two separate stages: the model must first decide to use a tool and then the tool execution flow must complete successfully. Differences between the Playground and the published runtime can affect either stage

Regarding the function-calling behavior different between Teams and the Playground - Yes. Once an agent is published, it operates as a managed Agent Application with its own deployment, identity, permissions, and runtime characteristics. Because of these differences, a tool that behaves as expected during Playground testing may require additional validation when accessed through Teams.

It is helpful to first determine whether:

  • A tool call is never generated by the model.
  • A tool call is generated but the execution flow does not complete successfully.

This distinction helps identify if the focus area needs to be on tool selection or tool execution.

Regarding if require_approval="never" guarantee tool execution - No , the require_approval="never" setting only removes the approval requirement before a tool can execute. It does not:

  1. Force the model to invoke a tool.
  2. Influence the model's tool selection decision.
  3. Automatically execute custom function logic.
  4. Guarantee tool execution across different channels.

Please check if the following steps help-

  1. Reviewing Agent Run Traces Review traces to determine:
    • Whether a tool call is being generated.
    • Whether the tool call completes successfully.
    • Any tool input/output failures.
    • Whether the issue occurs during tool selection or execution.
  2. Verifying the Active Published Version Please confirm that:
    • Teams is using the same published agent version that was validated in the Playground.
    • The tool exists in the active published version.
    • Any recent tool or schema changes have been republished
  3. Validating Tool Selection Configuration Review:
    • Tool descriptions.
    • Tool instructions.
    • Trigger conditions.
    • Any configured tool_choice settings.
    Clear and specific tool guidance can improve invocation reliability and reduce the likelihood of direct text responses when a tool should be used.
  4. Validating the Tool Execution Path If traces show that a tool call is generated but does not complete successfully, review how the tool is exposed to the published runtime. Documented Azure-native approaches include:
    • Azure Functions
    • OpenAPI tools
    • Logic Apps actions
    These approaches provide service-accessible execution paths that are commonly used in published agent scenarios.
  5. Validating Identity and Permissions Published agents operate under their own identity and permissions boundary. Review:
    • RBAC assignments.
    • Managed Identity configuration.
    • Access to downstream resources required by the tool.
    Permission differences between environments can affect tool behavior after publishing.
  6. Validating Model, Region and SDK Compatibility As a secondary validation, please confirm:
    • The selected model supports the configured tool type.
    • The deployment region supports the required capabilities.
    • Whether the behavior reproduces using the latest supported SDK version, since azure-ai-projects==1.0.0b11 is a beta release.

The following references might be helpful , please check them out

Thank you

Please "Accept" the answer with an "Upvote" if the response was helpful. This will be benefitting other community members who face the same issue.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Ravi Kiran Pagidi 170 Reputation points
    2026-06-28T02:19:49.34+00:00

    Hi Jubin,

    Yes, the behavior can be different when the agent is used through Teams.

    require_approval="never" only means the tool call does not require human approval. It does not force the model to call the tool, and it also does not automatically execute local/custom function code in every channel.

    For function calling, the usual pattern is:

    1. Agent decides a function is needed.
    2. Agent returns a function call with arguments.
    3. Your application/backend executes the function.
    4. Your application sends the function output back to the agent.
    5. Agent returns the final answer.

    In the Foundry playground, this can appear to work because the test environment/session is handling the tool flow. In a Teams published channel, your local SDK function implementation is not automatically available unless the tool is exposed as something the published agent can actually call.

    For Teams, I would use one of these patterns instead of a local custom function:

    • Azure Functions tool
    • OpenAPI tool
    • Logic Apps action
    • MCP server/tool endpoint
    • A custom bot/backend that handles the function call and submits tool outputs back to the agent

    Also check that the active published agent version is the same version where the tool was added. If you changed the agent after publishing, update the active version or republish/update the Teams agent.Hi Jubin,

    Was this answer helpful?

    0 comments No comments

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.