Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Azure Policy to control which models a developer can include in a model router deployment in Microsoft Foundry. Model router honors the same built-in Foundry model deployment policy that governs standard model deployments. Azure Policy checks the models in a model router deployment when you create or update it in the Foundry portal, the REST API, the Azure CLI, and Azure Resource Manager (ARM) templates. To keep routing inside approved models, pair the policy with a model subset. This article shows IT admins how to assign the policy and govern Auto (model router without a deployment), and shows developers what to expect when they deploy model router while a policy is active.
- Azure Policy is checked when you create or update a model router deployment, on every surface: the Foundry portal, REST API, Azure CLI, and ARM templates.
- Policy doesn't filter which models a deployment or Auto routes to at request time. To keep routing inside approved models, use a model subset.
- In the Foundry portal, unapproved models stay visible in the model subset list, but you can't select them.
- Admins can limit Auto to approved models, or turn it off, for each Foundry resource.
Important
Features or capabilities marked (preview) in this article are in public preview and are subject to the Supplemental Terms of Use for Microsoft Azure Previews. Previews are provided without a service-level agreement, and Microsoft doesn't recommend them for production workloads. Certain features might not be supported or might have constrained capabilities.
Prerequisites
An Azure account with an active subscription. If you don't have one, create a free Azure account.
A Foundry resource in a region that supports model router. See Supported regions.
Permissions to assign Azure Policy. To create and assign policies, you must be an Owner or Resource Policy Contributor at the subscription or resource group level.
Familiarity with Azure Policy. To learn more, see What is Azure Policy?.
How model router honors Azure Policy
Azure Policy is evaluated when you create or update a model router deployment, not on each request. It doesn't filter which models a deployment or Auto routes to at request time. To keep routing inside approved models, use a model subset: route a deployment to a subset of models, or set Auto's models for the resource.
When an Azure Policy is active at the subscription, resource group, or management group scope, model router enforces the policy at deploy time on every surface:
- Foundry portal: The model subset selector lists all model router supported models, but checkboxes for unapproved models are disabled. A banner explains that selections are governed by Azure Policy.
- REST API, Azure CLI, and ARM templates: A model router deployment that includes an unapproved model is rejected with a policy violation. The behavior is consistent with the portal: the same policy decision applies regardless of how the deployment is created.
- Existing (brownfield) deployments: When you update or assign a policy, Azure Policy reevaluates existing model router deployments and lists noncompliant deployments on the Azure Policy Compliance page in the Azure portal. You can then remediate by removing the noncompliant deployment or by updating the model subset.
Compliance monitoring and drift detection
When you scope policies to management groups or subscriptions, Azure Policy evaluates all model router resources within that scope and reports results on the Azure Policy Compliance page in the Azure portal. Administrators can monitor compliance state across the organization and identify deployments that drift from approved configurations after a policy is assigned or updated.
The effect you choose when assigning the policy determines how it applies to new and existing model router deployments:
- Deny blocks new noncompliant deployments at deploy time and lists existing noncompliant deployments on the Compliance page for remediation. It doesn't remove or modify existing deployments; you update them yourself.
- Audit logs noncompliant deployments without blocking new requests. Use the Audit effect to measure the impact of a policy before you switch to Deny enforcement.
Model discoverability is preserved. Unapproved models remain visible in the model subset list so developers can see the full set of supported models and request approval through their administrator if they need a model that isn't on the allowed list.
The following screenshot shows the deployment pane in the Foundry portal when a policy is active. The restriction banner explains that the organization's policy excludes certain models from routing, and developers can select View blocked to see which models are blocked.
Assign a policy that governs model router
Model router uses the same built-in Foundry policy that governs other model deployments, Foundry model deployments should only use approved models (previously named Cognitive Services Deployments should only use approved Registry Models). To assign or update this policy, follow the steps in Built-in policy for model deployment. The publisher names and asset IDs that you allow apply to model router selections automatically.
Note
To deploy and use model router while the approved-models policy is assigned, model router and every model included in the deployment must satisfy the policy through either an allowed publisher or an allowed asset ID. If you use publisher-based approval, include Microsoft for model router and each publisher represented in the selected routing set, such as Anthropic for Claude models. Publisher names are listed on each model's card in the model catalog. With ARM or the Azure CLI, one noncompliant model in the subset fails the whole deployment. In the Foundry portal, you can leave out noncompliant models and deploy a compliant subset.
Tip
Scope the policy to the resource group or subscription that contains your Foundry resources. The model subset selector evaluates the policy at the scope where the Foundry resource is created.
After you assign the policy, allow up to 15 minutes for the assignment to propagate before you test it on a model router deployment.
Deploy model router with a policy in effect
The following sections describe what a developer experiences when a policy that restricts approved models is active.
Foundry portal
-
Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
Select Discover in the upper-right navigation, and then select Models in the left pane to open the model catalog.
Find
model-router, select it, and then select Deploy.When a policy is active, a restriction banner appears at the top of the model details page. The banner tells you that your organization's policy excludes certain models from routing.
To preview which models are excluded, select View blocked. The Models blocked by IT Admin dialog lists the models that your organization's policy excludes from routing.
In the deployment pane, choose Custom settings to expand model subset configuration.
In the Models subset section, select Route to a subset of models.
When a policy is active, an informational banner appears at the top of the model list that tells you the selection is governed by your organization's Azure Policy. The banner asks you to contact your IT administrator to request changes.
Select from the enabled (approved) models. Unapproved models remain visible but their checkboxes are disabled.
To review the full list of blocked models from the deployment pane, select View blocked in the restriction banner.
Select Deploy. The deployment uses the compliant model subset.
For the full deployment walkthrough without policy steps, see Deploy model router.
REST API, Azure CLI, and ARM templates
When you create a model router deployment from outside the portal, Azure Policy evaluates on the control plane. If the deployment request includes a model that's not on the allowed list, the request is rejected with a policy violation response, and no model router deployment is created.
To stay compliant on the command line:
Identify the approved model asset IDs and publisher names from the policy assignment, or from your IT administrator.
When you author the request body for the model router deployment, include only those approved models in the model subset. Use the exact
format,name, andversionvalues from Supported models.Submit the deployment by using the REST API example in Route to a subset of models.
If the request fails, inspect the response message to see which model triggered the policy. Update the request body to remove the noncompliant model and resubmit.
Audit existing model router deployments
When you assign a new policy, or when you update an existing policy to disallow a model that's already in use, Azure Policy reevaluates existing model router deployments at the next compliance evaluation cycle. Use the following steps to find and remediate noncompliant deployments:
From the Azure portal, select Policy.
Select Compliance and find your policy assignment. Noncompliant model router deployments appear in the Resource compliance view.
For each noncompliant deployment, choose one of the following remediation paths:
- Update the model router deployment to remove the disallowed model from the model subset.
- Delete the model router deployment and create a new one that uses only approved models.
Compliance results can take up to 24 hours to appear after a policy change. To force evaluation sooner, trigger an on-demand evaluation scan.
Govern Auto
Auto (model router without a deployment) is in preview. Auto has no deployment, so deployment-time policy checks don't restrict the models it routes to. Govern it with these controls:
| Goal | How | Scope |
|---|---|---|
| Turn off Auto | Set properties.instant.modelAllowList to []. In West US 3, to keep other instant-access models, list them without the model-router entry. |
One Foundry resource |
| Keep Auto on approved models | List only approved models in properties.instant.routing.models. |
One Foundry resource |
| Set Auto's content filter | Set properties.instant.raiPolicyName. |
One Foundry resource |
The resource settings use ARM API version 2026-01-15-preview, and changes can take up to 15 minutes to reach every request. For example, this request limits Auto in one resource to two approved models:
az rest --method patch \
--url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<resource>?api-version=2026-01-15-preview" \
--body '{
"properties": {
"instant": {
"routing": {
"mode": "balanced",
"models": [
{"format": "OpenAI", "name": "gpt-5.6-sol", "version": "2026-07-09"},
{"format": "OpenAI", "name": "gpt-5.6-luna", "version": "2026-07-09"}
]
}
}
}
}'
A new modelAllowList replaces the old one; it doesn't merge, so include every instant-access model that you want to keep. An update to instant also resets routing and raiPolicyName when you leave them out, so send both together. For every request body and the Bicep versions, see Configure Auto for your resource. For all instant-access controls, see Enterprise controls.
Troubleshoot
| Symptom | Cause | Resolution |
|---|---|---|
| Model subset checkboxes are unexpectedly disabled in the Foundry portal | A policy assignment at the subscription or resource group scope restricts the affected models. | Check the banner at the top of the model subset list. Contact your IT administrator to request a model approval or a policy update. |
| API or CLI deployment fails with a policy violation, but the same models work in the portal for a different project | The policy assignment scope or parameters differ between projects. | Compare the policy assignment scope and the Allowed Asset Ids parameter values for both projects in the Policy > Assignments view. |
| Approved model is blocked unexpectedly | The model asset ID or publisher name in the policy parameters doesn't exactly match the model. | Asset IDs and publisher names are case-sensitive. Compare the parameter values against the model card in the model catalog. |
| The Azure Policy Compliance page doesn't show a recent change | Compliance evaluation hasn't completed yet. | Wait for the next evaluation cycle (up to 24 hours) or trigger an on-demand evaluation scan. |
| Policy banner doesn't appear in the model subset selector | The policy assignment hasn't propagated, or no policy is assigned at the resource scope. | Allow up to 15 minutes for a new assignment to propagate. Verify that an assignment exists at the subscription or resource group scope. |
| A policy denies a model, but a model router deployment or Auto still routes to it | Azure Policy is checked when a deployment is created or updated. It doesn't filter routing at request time. | Route the deployment to a subset of approved models, and set Auto's models or turn off Auto for the resource. |