Question 120
A service principal synchronizes metadata for three named storage accounts spread across different resource groups in a subscription. It may not manage any other storage accounts. How should its Azure RBAC permissions be scoped?
Explanation
Correct Answer
Azure RBAC can scope a principal's role directly to an individual resource. Three account-level assignments give the automation exactly the necessary reach even though the accounts are in different resource groups. This avoids granting the same role to other accounts in a common resource group or across the subscription. Choose the role definition based on whether the process reads management settings or actually edits them, then assess all effective inherited assignments for unexpected additional permissions.
Incorrect Answers
Management-group Owner would confer extensive resource-control and access-administration rights across an entire hierarchy, far outside the three-account automation task. This dramatically overprivileges the service principal. Assigning only the needed role on the three named storage resources provides a narrower and more auditable security boundary.
A subscription-scope storage role would inherit to other storage accounts in the subscription, not just the three approved endpoints. The automation is prohibited from affecting those unrelated accounts. Three resource-level grants preserve the exact selection without making the service principal an administrator across every storage account in that subscription.
Resource-group-level grants can include other resources and storage accounts co-located with each target. Because the contract names only three particular accounts, group scopes may be broader than required. Assigning the role directly on each account avoids exposing sibling accounts in those groups.