Azure policy to auto add user group in resource group contributors

Ashish Mishra 1 Reputation point
2020-07-30T12:20:43.583+00:00

This is my first project in Azure. Please avoid if any mistake. I have a user group "Azure Cross Team Contributors". I want to add it in resource group contributors by default whenever I create any resource group. I got to know there is policy, But not able to write policy rule. What would be policy rule for this scenario.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
799 questions
{count} votes

1 answer

Sort by: Most helpful
  1. DCtheGeek-MSFT 451 Reputation points Microsoft Employee
    2020-07-31T03:06:51.15+00:00

    Azure Policy lets you audit the compliance of the configuration of Azure Resource Manager (ARM) properties. In some cases, such as AKS or Guest Configuration, it can also audit configuration of Resource Provider properties. While Azure Policy can be used to audit how a role definition is defined (sample here), it isn't for applying roles to specific objects. That's the domain of Azure role-based access control (RBAC). If you want the group "Azure Cross Team Contributors" to have access to all resource groups within a subscription, an easier alternative is to grant the role assignment at the subscription scope.

    You mention "Resource Group Contributors", but I don't believe there is a built-in role with that name. Is this a custom role you've created?