question

AshishMishra-0875 avatar image
0 Votes"
AshishMishra-0875 asked ·

Azure policy to auto add user group in resource group contributors

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
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AshishMishra-0875 Thank you for reaching out, we will look into this and get back to you at the earliest.

0 Votes 0 · ·

1 Answer

DCtheGeek avatar image
0 Votes"
DCtheGeek answered ·

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?

· 3 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Thank you @DCtheGeek for helping on this thread.

@AshishMishra-0875 Can you please review the above information and revert back if you have any further queries.

0 Votes 0 · ·

I was able to solve this with microsoft support ticket. It was something DCtheGeek mentioned

0 Votes 0 · ·
bharathn-msft avatar image bharathn-msft AshishMishra-3381 ·

@AshishMishra-3381 Thank you for circling back and updating the thread, glad that it got solved via Microsoft Support ticket. Feel free to use this community for any queries you might in the future, will try our best to answer or direct you accordingly.

0 Votes 0 · ·