How to disable web_search tool being auto-selected in Azure Foundry when an agent is created

Guo, Jianning 165 Reputation points
2026-11-09T18:29:57.2533333+00:00

We are currently testing Foundry in our sandbox environment.  When a user builds a new Text agent within Foundry project via the following steps captured in the screenshot below, the new agent will be created with web_search as default tool. 

User's image

User's image

Since web_search uses Grounding with Bing, it creates additional cost which is currently not approved in our enterprise environment.

We have tried implementing the following two methods at subscription level to block the usage of the web_search tool without any success.

User's image

    1. Disable web search via Azure CLI – based on Azure document - Use web search tool in Foundry Agent Service - Microsoft Foundry | Microsoft Learn
    2. az feature register --name OpenAI.BlockedTools.web_search --namespace Microsoft.CognitiveServices --subscription "<subscription-id>"

None of the above methods blocks the agent selecting web_search as default tool during creation time.  Has anyone run into this scenario and has a workable solution to suggest?

We only using gpt-5-mini model in our Foundry environment.

Thanks,

Jane

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


Answer accepted by question author and recommended by moderator
Maraiah Kasetti (Wipro Limited) 175 Reputation points Microsoft External Staff Moderator
2026-11-09T20:19:03.6966667+00:00

Hello Jane,
You reported that new Text agents in your Foundry sandbox are created with web search already attached, even after you assigned the "[Preview]: Microsoft Foundry agents and toolboxes should not use denied tools" policy and registered OpenAI.BlockedTools.web_search. Because Grounding with Bing isn't an approved cost in your environment, the controls below focus on stopping Bing from actually being called.

Root cause (likely, based on internal engineering findings): The deny-tools Azure Policy depends on a tool-governance capability that isn't switched on yet. Our engineering team has confirmed that this enforcement is "not supported now", and an internal test with deniedToolTypes: ["web_search"] and effect Deny still allowed agents to be created and updated. The subscription feature flag disables web search across all accounts in the subscription. It does not change the portal's default tool selection, and in testing it didn't block web search reached through a Toolbox. I haven't found any documented setting that removes web search from the portal's default tools.

Steps:

  • Step 1: Check the flag's state. Run az feature show --name OpenAI.BlockedTools.web_search --namespace Microsoft.CognitiveServices --subscription "<subscription-id>".
    • Why this matters: the block takes effect only once registration completes.
      • How to verify: properties.state = Registered.
      • Step 2: Run a test agent that still has the default web search tool. Ask it something that needs current data.
        • Why this matters: this shows whether Bing is actually called, which is what generates cost.
          • How to verify: the run output or trace contains no web_search_call, or reports that the tool is blocked.
          • Step 3: Make sure no project toolbox contains a web_search tool, and remove any you find.
            • Why this matters: the flag doesn't currently cover the Toolbox path.
              • How to verify: listing your toolboxes shows no web_search entry.
              • Step 4: Keep the deny policy assigned, using plain tool names without the _preview suffix.
                • Why this matters: it will start blocking agent creates and updates once governance is rolled out, and it gives you compliance reporting until then.
                  • How to verify: the assignment shows in Azure Policy compliance with Enforcement mode set to "Enabled".

Steps 3 and 4 are workarounds, not a permanent fix. Engineering is tracking the governance rollout internally but hasn't given a date for it.

References:

  • Use web search tool in Foundry Agent Service — Relevant section: Administrator control for the web search tool
  • Web search with the Responses API — Relevant section: Manage web search tool / TroubleshootingYou reported that new Text agents in your Foundry sandbox are created with web search already attached, even after you assigned the "[Preview]: Microsoft Foundry agents and toolboxes should not use denied tools" policy and registered OpenAI.BlockedTools.web_search. Because Grounding with Bing isn't an approved cost in your environment, the controls below focus on stopping Bing from actually being called. Root cause (likely, based on internal engineering findings): The deny-tools Azure Policy depends on a tool-governance capability that isn't switched on yet. Our engineering team has confirmed that this enforcement is "not supported now", and an internal test with deniedToolTypes: ["web_search"] and effect Deny still allowed agents to be created and updated. The subscription feature flag disables web search across all accounts in the subscription. It does not change the portal's default tool selection, and in testing it didn't block web search reached through a Toolbox. I haven't found any documented setting that removes web search from the portal's default tools. Steps:
    • Step 1: Check the flag's state. Run az feature show --name OpenAI.BlockedTools.web_search --namespace Microsoft.CognitiveServices --subscription "<subscription-id>".
      • Why this matters: the block takes effect only once registration completes.
      • How to verify: properties.state = Registered.
    • Step 2: Run a test agent that still has the default web search tool. Ask it something that needs current data.
      • Why this matters: this shows whether Bing is actually called, which is what generates cost.
      • How to verify: the run output or trace contains no web_search_call, or reports that the tool is blocked.
    • Step 3: Make sure no project toolbox contains a web_search tool, and remove any you find.
      • Why this matters: the flag doesn't currently cover the Toolbox path.
      • How to verify: listing your toolboxes shows no web_search entry.
    • Step 4: Keep the deny policy assigned, using plain tool names without the _preview suffix.
      • Why this matters: it will start blocking agent creates and updates once governance is rolled out, and it gives you compliance reporting until then.
      • How to verify: the assignment shows in Azure Policy compliance with Enforcement mode set to "Enabled".
    Steps 3 and 4 are workarounds, not a permanent fix. Engineering is tracking the governance rollout internally but hasn't given a date for it. References:

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Oldest

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.