An organization's Azure environment has the following resource hierarchy:
- Management Group: `MG-Corporate`
- Subscription: `Sub-Dev`
- Resource Group: `RG-Shared`
- Resource Group: `RG-Secret`
A group of developers is currently assigned the Reader role at the `Sub-Dev` subscription scope. You must ensure that the developers can view resources in `RG-Shared`, but they must not be able to view any resources in `RG-Secret`.
Which configuration should you implement to meet this requirement while adhering to the principle of least privilege?
- Remove the Reader role assignment from the subscription level, and assign the Reader role to the developer group at the RG-Shared resource group scope.Answer
- BKeep the Reader role assignment at the subscription level, and assign a custom Azure RBAC role with a Deny action to the developer group at the RG-Secret resource group scope.
- CKeep the Reader role assignment at the subscription level, and assign the Reader role to the developer group at the RG-Shared resource group scope while omitting the assignment at the RG-Secret scope.
- DRemove the Reader role assignment from the subscription level, and assign the Global Reader directory role in Microsoft Entra ID to the developer group.
Answer
Remove the Reader role assignment from the subscription level, and assign the Reader role to the developer group at the RG-Shared resource group scope.
Removing the subscription-level Reader assignment prevents developers from inheriting read access to RG-Secret. Assigning the Reader role directly at the RG-Shared scope restricts their access to only the necessary resource group, fulfilling the security requirement without over-provisioning.
Step-by-Step Solution
Key Concept
Azure RBAC inheritance and scope hierarchy