Azure (Resource Manager deployments)

Azure RequestDisallowedByPolicy: resource was disallowed by policy

Azure RequestDisallowedByPolicy means an Azure Policy assignment blocked a resource. Find the policy named in the error and make the deployment comply.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

Microsoft's article says you get the RequestDisallowedByPolicy error, when deploying an ARM template or Bicep file, when one of the resources to deploy doesn't comply with an existing Azure Policy. The common errors table puts it the same way: your subscription includes a resource policy that prevents an action you're trying to do during deployment. The deployment is blocked by design, not by a bug.

Organizations assign policies to enforce standards and to assess compliance at scale. Microsoft's example is a subscription with a policy that prevents public IPs on network interfaces: if you try to create a network interface with a public IP address, the policy blocks it, and the error message says the resource "was disallowed by policy". Azure CLI, Azure PowerShell and the portal's activity log all show the same key elements: the error code, the policy assignment and the policy definition, each with a name and an ID.

Those two names are what you need. The definition holds the rule that your resource broke, and the assignment shows where it applies. Microsoft's fix is to read the rule and change your deployment to comply with it, rather than to work around the policy.

Common causes

  • A resource in the template has a property that a policy denies, such as a public IP on a network interface.
  • A required tag or setting is missing, and a policy with a deny effect blocks resources without it.
  • A policy restricts allowed locations, SKUs or resource types, and the template uses something outside the list.
  • A policy requires a setting such as disabled public network access, and the resource does not set it.

How to fix it

1. Read the policy names from the error

Open the full error in the CLI output or the portal's activity log. Note the policyAssignment name and ID and the policyDefinition name and ID. Microsoft says you need these names to get more information about the policy.

2. Look up the policy definition and assignment with Azure CLI

az policy definition show --name {policy-name}
az policy assignment show --name {assignment-name} --resource-group {resource-group-name}

3. Or use Azure PowerShell

$subid = (Get-AzContext).Subscription.Id
$defname = "<policy definition name>"
(Get-AzPolicyDefinition -Id "/subscriptions/$subid/providers/Microsoft.Authorization/policyDefinitions") |
  Where-Object -Property Name -EQ -Value $defname |
  ConvertTo-Json -Depth 10
 
$rg = Get-AzResourceGroup -Name "<resource group name>"
$assignmentname = "<policy assignment name>"
Get-AzPolicyAssignment -Name $assignmentname -Scope $rg.ResourceId | ConvertTo-Json -Depth 5

4. Update the template to comply with the rule

The policy definition contains a description and the rules that are applied. Review the rules and change your ARM template or Bicep file to meet them. Microsoft's example: if the rule states that public network access is disabled, update the matching resource property. Then deploy again.

5. Plan for tag policies

If the blocking policy requires tags, add them to the resource or resource group in the template. The guide to Azure Policy tag enforcement shows how require, inherit and modify policies interact and why a deny policy can block a resource group created without a tag.

If nothing works

If your change cannot comply because the resource genuinely needs the blocked setting, this is a general step: take the assignment name to the team that owns Azure Policy and ask whether an exemption or a different design is appropriate. If the blocking policy is about multi-factor authentication for resource management, see the guide to Azure mandatory MFA for CLI, PowerShell and Terraform, which covers that form of the error.

What we checked

Two Microsoft Learn pages were read. "Resolve errors for request disallowed by policy" describes the RequestDisallowedByPolicy error, its policy assignment and definition details, the public IP example, and the Azure CLI and PowerShell commands to read the policy before updating the template. "Troubleshoot common Azure deployment errors" lists RequestDisallowedByPolicy with its mitigation. The error was not reproduced for this page.

Last checked: 2026-11-21.

Official sources

  • Resolve errors for request disallowed by policyWhen deploying an Azure Resource Manager template (ARM template) or Bicep file, you get the RequestDisallowedByPolicy error when one of the resources to deploy doesn't comply with an existing Azure Policy.
  • Troubleshoot common Azure deployment errorsRequestDisallowedByPolicy Your subscription includes a resource policy that prevents an action you're trying to do during deployment. Find the policy that blocks the action.

Questions people ask

What does RequestDisallowedByPolicy mean?

One of the resources in your deployment does not comply with an Azure Policy assigned to your subscription or resource group, so the policy blocked it. Microsoft gives the example of a policy that prevents public IPs on network interfaces.

How do I find which policy blocked my deployment?

The error message includes the names and IDs of the policy assignment and the policy definition. Use az policy definition show and az policy assignment show, or Get-AzPolicyDefinition and Get-AzPolicyAssignment, to read them.

Should I just remove the policy?

Microsoft's fix is to review the policy rules and update your template or Bicep file to comply, because policies enforce organizational standards. Changing or exempting the policy is a decision for whoever owns it.

Guides that mention RequestDisallowedByPolicy

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.