deploying Microsoft.Authorization/denyAssignments@2024-07-01-preview at resource group scope using ARM/Bicep.

Dev_Admin 21 Reputation points
2026-05-02T17:35:27.6066667+00:00

  We are deploying Microsoft.Authorization/denyAssignments@2024-07-01-preview at resource group scope using ARM/Bicep.

  The template compiles successfully, but deployment fails with:

  Code:

  UserAssignedDenyAssignmentsNotSupported

  Message:

  User assigned deny assignments are not allowed for current subscription.

  Request:

  Please confirm whether this subscription can be enabled/allowlisted for user-assigned deny assignments using Microsoft.Authorization/denyAssignments@2024-07-01-preview, or confirm that this capability is unavailable and only Azure-managed d

eny assignments through Deployment Stacks are supported.

  Business reason:

  We need to create a deny assignment with All Principals, excluded service principals/users, Actions *, DataActions *, and a specific NotActions allowlist to match an existing security control.

Azure Batch
Azure Batch

An Azure service that provides cloud-scale job scheduling and compute management.


1 answer

Sort by: Most helpful
  1. Christos Panagiotidis 3,301 Reputation points
    2026-07-18T10:14:35.8766667+00:00

    The Bicep resource definition being published does not mean a customer subscription can create arbitrary deny assignments. Azure RBAC documentation explicitly states that you cannot directly create your own deny assignments; Azure creates and manages them, and they are system protected. Therefore UserAssignedDenyAssignmentsNotSupported is expected and is not caused by resource-group scope, your role, or a missing provider registration. There is no documented subscription allowlist path for this scenario.

    The supported option is a deployment stack with denySettings. Use mode denyDelete or denyWriteAndDelete, then configure excludedPrincipals, excludedActions, and applyToChildScopes as needed. The stack creates and owns the deny assignment for resources managed by that stack.

    This is not equivalent to the fully custom permissions/DataActions/NotActions object in your raw template. If the control must apply more broadly, combine Azure Policy to deny or audit specific resource configurations with narrowly scoped RBAC permissions. Retrying the preview denyAssignments resource will continue to fail.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

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.