# Microsoft Foundry agents and toolboxes should not use denied tools (preview)

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Microsoft Foundry agents and toolboxes should not use denied tools (preview) is an Azure guardrail written in Azure Policy. Denies Microsoft Foundry agents and toolboxes that use tool types, MCP endpoints or MCP connectors on your denied lists. Copied from a licensed open source set and read on 10 Nov 2026.

```text
Built-in policy definition: [Preview]: Microsoft Foundry agents and toolboxes should not use denied tools
Definition ID: 7740c22b-07ef-4bac-9f5a-e38d188f80b7
Category: Cognitive Services
Supported effects: Audit, Deny, Disabled
policyRule (copied from the repository file):
{
    "if": {
      "anyOf": [
        {
          "allOf": [
            {
              "field": "type",
              "equals": "Microsoft.CognitiveServices.Data/accounts/projects/agents"
            },
            {
              "count": {
                "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*]",
                "where": {
                  "anyOf": [
                    {
                      "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*].type",
                      "in": "[parameters('deniedToolTypes')]"
                    },
                    {
                      "allOf": [
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*].type",
                          "equals": "mcp"
                        },
                        {
                          "count": {
                            "value": "[parameters('deniedMcpEndpoints')]",
                            "name": "endpointPatternAgents",
                            "where": {
                              "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*].serverUrl",
                              "like": "[current('endpointPatternAgents')]"
                            }
                          },
                          "greater": 0
                        }
                      ]
                    },
                    {
                      "allOf": [
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*].type",
                          "equals": "mcp"
                        },
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/agents/tools[*].connectorId",
                          "in": "[parameters('deniedMcpConnectors')]"
                        }
                      ]
                    }
                  ]
                }
              },
              "greater": 0
            }
          ]
        },
        {
          "allOf": [
            {
              "field": "type",
              "equals": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes"
            },
            {
              "count": {
                "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*]",
                "where": {
                  "anyOf": [
                    {
                      "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*].type",
                      "in": "[parameters('deniedToolTypes')]"
                    },
                    {
                      "allOf": [
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*].type",
                          "equals": "mcp"
                        },
                        {
                          "count": {
                            "value": "[parameters('deniedMcpEndpoints')]",
                            "name": "endpointPatternToolboxes",
                            "where": {
                              "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*].serverUrl",
                              "like": "[current('endpointPatternToolboxes')]"
                            }
                          },
                          "greater": 0
                        }
                      ]
                    },
                    {
                      "allOf": [
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*].type",
                          "equals": "mcp"
                        },
                        {
                          "field": "Microsoft.CognitiveServices.Data/accounts/projects/toolboxes/tools[*].connectorId",
                          "in": "[parameters('deniedMcpConnectors')]"
                        }
                      ]
                    }
                  ]
                }
              },
              "greater": 0
            }
          ]
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]"
    }
  }
```

- **Blocks:** Denies Microsoft Foundry agents and toolboxes that use tool types, MCP endpoints or MCP connectors on your denied lists.
- **Breaks:** This definition is a preview, and the same definition supports Audit, so a deny only applies when you set the effect to Deny. ([source](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-deny))
- **Test before applying:** As for every Azure Policy guardrail: [how to test before enforcing](/mechanisms/azure-policy/)
- **Mechanism:** [Azure Policy (built-in definitions)](/mechanisms/azure-policy/): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
- **Taken from:** [open source set](https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-policies/policyDefinitions/Cognitive%20Services/DenyAgentAndToolboxTools_Audit.json), MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

## What the source says

"Prevents Microsoft Foundry agents and toolboxes from using tool types, MCP endpoints, and MCP connectors denied by your organization." (read 10 Nov 2026).

What it breaks is documented for every guardrail of this mechanism: see [Azure Policy](/mechanisms/azure-policy/).

## Related guardrails

- [Region deny that allows Bedrock cross-Region inference](/guardrails/aws-scp-region-deny-with-bedrock-cris/): AWS, Service control policies (SCPs), ai services
- [Allow only approved Amazon Bedrock models](/guardrails/aws-scp-bedrock-approved-models-only/): AWS, Service control policies (SCPs), ai services
- [Deny Amazon Bedrock API keys](/guardrails/aws-scp-deny-bedrock-api-keys/): AWS, Service control policies (SCPs), ai services
- [Configure Cognitive Services accounts to disable public network access](/guardrails/azure-policy-ai-disable-public-network/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Cognitive Services accounts to disable local authentication](/guardrails/azure-policy-ai-disable-local-auth/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Azure AI Services resources to disable local key access](/guardrails/azure-policy-ai-disable-local-auth-dine/): Azure, Azure Policy (built-in definitions), ai services

## Related pages

- [Azure AI Search services should disable public network access (Azure Azure Policy)](/guardrails/azure-policy-search-disable-public-network/)
- [Deployment stack deny settings (Azure RBAC deny assignment) (Azure Azure RBAC deny assignments)](/guardrails/azure-deny-assignment-deployment-stack/)
- [Resource locks (CanNotDelete and ReadOnly) (Azure Azure resource locks)](/guardrails/azure-lock-cannotdelete-readonly/)

## Sources

- Microsoft Foundry agents and toolboxes should not use denied tools (preview): https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-policies/policyDefinitions/Cognitive%20Services/DenyAgentAndToolboxTools_Audit.json (read 10 Nov 2026)
- What it breaks: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-deny (read 10 Nov 2026)
- How to test it first: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/azure-policy-foundry-denied-tools/
