Power Platform Engineer cover image. Category: Microsoft Foundry. Title: Foundry Checks Tools Twice: When an Agent Is Saved and When It Runs.

Microsoft Foundry Can Now Restrict Agent Tools. One Control Checks the Save, the Other Checks the Run.

Microsoft Foundry now has a documented way to limit which tools an agent can use. The Learn article Govern tools in Microsoft Foundry (preview), updated November 17, 2026, describes two native controls: an Azure Policy that checks agent and toolbox definitions when they are saved, and a project setting called tool controls that decides which tools can actually run.

The two controls check different moments and are configured separately. Neither updates the other. A team that sets one and assumes it has covered both can end up with an agent that saves fine and then fails at run time, or with a policy that blocks new versions while older versions keep calling a tool nobody approved. This article walks through how the two fit together, with a worked example and a rollout order you can apply in a test project first.

What the Learn page covers

  • Native tool governance for Foundry prompt agents and toolboxes. It does not require an AI gateway.
  • A built-in Azure Policy definition, [Preview]: Microsoft Foundry agents and toolboxes should only use approved tools, with Audit, Deny and Disabled effects. Audit is the default.
  • A project property, properties.toolControls, set through REST or Terraform with API version 2026-09-15-preview.
  • A verification checklist and a troubleshooting section that treat saving and running as two separate tests.

Everything on the page is labelled preview: the article title, the policy definition and the API version.

Two controls, two moments

Azure Policy checks the save. The approved-tools policy compares a prompt agent or toolbox definition against an allow list built from three parameters: approved tool types (approvedToolTypes), approved MCP endpoints (approvedMcpEndpoints) and approved MCP connectors (approvedMcpConnectors). With Deny, a create or update that uses an unapproved tool is rejected. With Audit, it is saved and reported as noncompliant. Policy changes can take up to 30 minutes to take effect, and compliance results can take up to 12 hours to appear.

Project tool controls check the run. The toolControls property on the Foundry project holds a defaultAction and an allowedTools list. With defaultAction set to Deny, only listed tools can run. This applies to every agent in the project, including inline tool definitions and versions saved before the list existed. There is no audit mode, so a change takes effect as soon as it propagates.

Diagram titled Two controls, two moments. Azure Policy approved tools (preview) applies when an agent or toolbox is saved. Project tool controls apply when an agent runs a tool. Neither control updates the other, so keep both allow lists aligned.

The page states the separation plainly. Assigning the policy does not populate or rewrite toolControls, and updating toolControls does not change a policy assignment. It also makes a point that is easy to miss: toolControls is not a validation rule for saves. With defaultAction: Deny and only file_search allowed, you can still save an agent that uses web_search unless a policy blocks it. Saving a tool configuration does not invoke the tool.

What neither control covers

  • Prompt agents on the Microsoft Copilot harness. The policy currently applies to toolboxes and to prompt agents that use the Responses API without the Microsoft Copilot harness.
  • Hosted agent code. Hosted agents run your code, which the policy does not inspect. Govern them through the toolboxes they call. A noncompliant toolbox does not block a hosted agent from being created.
  • Projects without tool controls. If toolControls is absent, nothing restricts tool use at run time through this feature. Policies, authentication and network restrictions still apply.
  • Network traffic. Neither control is a firewall. For arbitrary outbound calls from hosted-agent code, the page points to network isolation and service-specific authorization.
  • Access. An allow list does not grant access to data, credentials or external services. A permitted tool can still fail on its connection, credentials or network settings.

For rate limits, IP restrictions and routing on MCP traffic, Microsoft documents a separate option: governing MCP tools through an AI gateway built on Azure API Management, also in preview.

Worked example: a claims agent at Contoso

Contoso runs a claims triage agent in a Foundry project. It searches uploaded claim documents with file_search and calls an internal MCP server at https://mcp.contoso.com/claims. The platform team wants to approve only those tools, and in particular to keep web_search out.

Step 1: assign the policy at the Foundry account

In the Azure portal, under Policy, then Definitions, the team finds the approved-tools definition, confirms its ID ends in e7352ad2-6c86-4a07-9573-47f67b557ba8, and assigns it at the Foundry account scope with these parameters:

ParameterValueWhy
EffectAudit, then DenyAudit first to see what would be blocked.
Approved Tool Types (approvedToolTypes)file_searchThe broad mcp type is left out on purpose. Approving it would approve every MCP server.
Approved MCP Endpoints (approvedMcpEndpoints)https://mcp.contoso.com/*Accepts any path on Contoso’s MCP host.
Approved MCP Connectors (approvedMcpConnectors)NoneThe agent does not use a connector-based MCP tool.

A tool passes when its type, its MCP endpoint or its MCP connector matches an approved entry; it does not need to match all three. That is why the MCP tool passes on its endpoint even though mcp is not an approved type. Endpoint patterns are case-insensitive, allow at most one wildcard and do not support regular expressions, so https://*.contoso.com/* would not be valid.

Step 2: set the runtime allow list in the project

The team reads the current project configuration first and keeps the file as a record, then writes tool-controls.json. The list is a full replacement, not an entry to append, so it has to contain every tool the project needs. Runtime MCP entries need the exact serverUrl the agent uses (or a connectorId), not a pattern:

{
  "properties": {
    "toolControls": {
      "defaultAction": "Deny",
      "allowedTools": [
        { "type": "file_search" },
        { "type": "mcp", "serverUrl": "https://mcp.contoso.com/claims" }
      ]
    }
  }
}

The update goes in as a PATCH that carries the ETag from the read, so it cannot overwrite a concurrent change. Condensed from the Learn procedure:

# PROJECT_URL = https://management.azure.com/<project resource ID>?api-version=2026-09-15-preview
az rest --method get --url "$PROJECT_URL" --output json > project-before.json
ETAG=$(jq -r '.etag // .eTag // empty' project-before.json)

az rest --method patch --url "$PROJECT_URL" \
  --headers "Content-Type=application/json" "If-Match=$ETAG" \
  --body @tool-controls.json

The Learn procedure stops if no ETag comes back. Teams using Terraform can manage the same property with azapi_update_resource, but should pick one method. Destroying that Terraform resource only removes it from state; it does not restore the previous controls.

Step 3: watch four changes play out

With the policy switched to Deny and the project list in place, here is how four ordinary changes behave:

Table titled One agent, four changes, for a Contoso claims agent, showing for each change whether the save is allowed under the Deny policy and whether the tool runs under project tool controls.
  1. Version 1 uses file_search and the claims MCP server. Both match the policy, so the save succeeds. Both are in allowedTools, so both run.
  2. A maker adds web_search and saves version 2. Under Deny, the save is rejected. Under Audit it would save and be reported, and the tool would still be blocked at run time because it is not on the project list.
  3. Version 0, saved before the policy, already uses web_search. The policy reports the mismatch but does not rewrite the version, because versions are immutable. Runtime reads the project’s stored controls, so web_search is blocked even in that old version. The fix is to create a compliant version and, for toolboxes, promote it to default.
  4. The team adds a second server, https://mcp.contoso.com/policies. The save succeeds because the endpoint matches the approved pattern. At run time the tool is blocked, because the project list names only the claims server.

The fourth case is the one to plan for. The policy accepts patterns, but the runtime list needs exact server URLs, so the two lists will drift every time a team adds a server. The fix is to send the complete list again, with the new entry and a fresh ETag:

"allowedTools": [
  { "type": "file_search" },
  { "type": "mcp", "serverUrl": "https://mcp.contoso.com/claims" },
  { "type": "mcp", "serverUrl": "https://mcp.contoso.com/policies" }
]

Toolboxes add one more layer. For a toolbox accessed through MCP, the runtime list needs the toolbox’s own endpoint, the tools it requires and every MCP endpoint those tools use. Allowing an inner tool does not approve the outer MCP connection. On the policy side, the toolbox’s MCP endpoint goes into approvedMcpEndpoints separately from the tools inside it.

Rollout order

Diagram titled Audit first, test both paths, then deny, showing four steps: audit at the Foundry account, set toolControls in a test project, switch the policy to Deny, and test saving and running separately.
  1. Audit at the Foundry account. Assign at the account scope where possible. Each assignment can only evaluate a limited number of agents and toolboxes, so broader scopes can leave resources unevaluated. Wait for compliance results before tightening anything.
  2. Set toolControls in a test project. Because there is no audit mode, test the complete list where a mistake will not stop production agents. Include every MCP endpoint your tools use.
  3. Switch the policy to Deny. Do it once Audit shows only the noncompliance you expect, and allow up to 30 minutes. If several Deny assignments apply, any one of them can block the save.
  4. Test saving and running separately. Save a version with an approved tool and one with an unapproved tool. Run a project-allowed tool, and confirm that a tool the policy permits but the project excludes saves but does not run. The page is explicit that a successful save, a compliant policy result or an accepted project update does not prove an agent can run.

Quick troubleshooting

SymptomLikely cause
A tool runs, but a new version will not saveThe policy was tightened without changing the project list. Align the agent definition and the project list with the policy.
A version saves, but the tool is blocked at run timeThe policy permits the tool and allowedTools does not.
An MCP tool is blocked although its inner tool is allowedThe server URL, connector ID or toolbox endpoint is missing from the project list.
Noncompliance is reported but nothing is blockedThe effect is Audit, the agent runs on the Microsoft Copilot harness, the scope is wrong, or the change has not propagated.
A denied tool still savesProject tool controls never block saves. Check the policy definition ID, approvedToolTypes and the 30-minute propagation window.
A permitted tool still failsThe allow list does not grant access. Check the connection, credentials, data access and network.

What the page leaves open

  • A deny-list policy exists but is not mentioned. The built-in policy reference also lists [Preview]: Microsoft Foundry agents and toolboxes should not use denied tools. The govern-tools page covers only the approved-tools definition, so there is no guidance yet on combining the two.
  • The evaluation limit has no number. The page says each assignment can evaluate a limited number of agents and toolboxes, without saying how many.
  • Who can change the runtime list. Policy assignment needs Owner or Resource Policy Contributor, but toolControls is updated through ordinary Azure Resource Manager access to the project. The page notes that the two permissions are separate and does not name a dedicated role, so review who has write access to each Foundry project.
  • Copilot harness coverage. Prompt agents on the Microsoft Copilot harness are outside the policy today. The page does not say whether that will change.
  • Runtime tool types. The examples show only file_search and MCP entries in allowedTools. Test any other tool type in a test project before relying on it.

Why this matters for Power Platform teams

Many organizations now build agents in both Copilot Studio and Foundry, and MCP servers are the common thread. In Copilot Studio, the main admin control for MCP tools is still the data policy, as covered in Copilot Studio agents can now use any MCP server as a tool. Foundry now gives Azure admins a policy at save time and an allow list at run time. Teams that keep an approved list of MCP servers should make sure the same list feeds both platforms, and should keep tool risks such as MCP tool poisoning in mind when deciding what goes on it. For the wider set of agent governance announcements from November, see the Microsoft Ignite 2026 announcements guide.

Admin checklist

  • Agree an approved list of tool types, MCP endpoints and MCP connectors, and leave out the broad mcp type.
  • Assign the approved-tools policy with Audit at the Foundry account scope, and check the definition ID.
  • Read each project’s current configuration and keep the file before changing toolControls.
  • Set defaultAction to Deny with a complete allowedTools list in a test project, including every exact MCP server URL and toolbox endpoint.
  • Switch the policy to Deny once the Audit results are clean.
  • Test saving and running separately, including an older version that uses a restricted tool.
  • Put a step in your MCP onboarding process that updates both the policy and the project list.
  • Delete unused agent and toolbox versions as routine maintenance, keeping those that active applications or rollback plans need.
  • Review who holds write access to each Foundry project.

Last verified November 22, 2026 against the Learn page dated November 17, 2026. The feature is in preview, so recheck parameter names, effects and API versions before production use.

Sources