Subscription Sub1 contains resource groups RG1, RG2 and RG3. Group1 is assigned the Contributor role at the Sub1 scope. The database team, Group2, is assigned Contributor at the RG1 scope, and no user is a member of both groups. Members of Group1 must no longer be able to modify any resource in RG1, but must keep managing everything in RG2 and RG3. Group2 must keep managing RG1. What should you do?
Show answer and explanation
Correct answer: B · Remove Group1’s Contributor assignment at the Sub1 scope, and assign Group1 the Contributor role at the RG2 scope and at the RG3 scope
Azure RBAC is additive: a principal’s effective permissions are the union of all its role assignments, and an assignment at Sub1 is inherited by RG1. No role assignment you add at RG1 can take away what the subscription-level Contributor grants. The inherited access has to be removed at its source and re-granted only where it is still needed, at RG2 and RG3. Group2’s own assignment at RG1 is untouched.
Why the other choices do not fit
- A. Reader is added on top of the inherited Contributor permissions, not instead of them. Group1’s effective access to RG1 is still Contributor.
- C. NotActions only subtracts operations from that custom role’s own Actions. It is not a deny, so it cannot remove permissions that the Contributor assignment at Sub1 already grants.
- D. A ReadOnly lock would stop Group1 from modifying RG1, but locks apply to every user regardless of role, so Group2 could no longer manage RG1 either.
