Based on the exhibit, which identity should be granted the Contributor role so access can be managed centrally as team members change?
Assigning the Contributor role to a Microsoft Entra security group creates a single role assignment that covers all current and future team members. When you add or remove users from the group, their access to rg-app updates automatically because the group itself is the principal bound to the role. This avoids the administrative burden of editing multiple individual role assignments and follows the least privilege principle because the role is scoped exactly to the application's resource group.
Why this answer
Assigning the Contributor role to a Microsoft Entra security group that contains the team members allows access to be managed centrally. As team members join or leave, you simply add or remove them from the group, and their permissions update automatically without needing to modify role assignments for each individual user. This aligns with Azure RBAC best practices for centralized identity governance.
Exam trap
The trap here is that candidates often think assigning roles to individual users (Option A) is simpler or more direct, overlooking the centralized management and scalability benefits of using a security group, or they confuse managed identities (Option C) with user identities, not realizing managed identities are for Azure resources, not human users.
Why the other options are wrong
Assigning Contributor to each user individually does not allow centralized management of access as team members change; each new member would require a separate assignment, and removals would need manual updates.
A managed identity is an Azure AD identity used by Azure resources to authenticate to services without storing credentials, not for assigning roles to human team members. It cannot be used for central access management as team members change.
Assigning Contributor to the management group that contains rg-app would grant the role to all subscriptions and resource groups under that management group, not just to the specific team members. The question requires central management as team members change, which is best achieved via a security group, not a management group.
When would these options actually be correct?
This option would be correct if the question required granting the Contributor role to specific users who are not part of a group or managed identity, and centralized management was not a requirement (e.g., a one-time assignment for a fixed team).
A question where a virtual machine or Azure function needs to access Azure resources (e.g., Key Vault, Storage) programmatically, and the solution must avoid storing credentials. Assigning Contributor to a managed identity would be correct.
This option would be correct if the question asked for granting Contributor role to all resources within an entire management group hierarchy, and the requirement was to manage access at the management group scope, not per team member changes.
Why candidates pick the wrong answer
Candidates may think that assigning roles directly to users is simpler and more straightforward, overlooking the need for centralized, scalable access management as team membership changes.
Candidates may confuse managed identities with security groups, thinking they can be used for role assignments to users, or they may recall that managed identities are a best practice for resource access without understanding their limitation to non-human identities.
Candidates may confuse management groups with security groups, thinking that assigning roles at the management group level provides centralized control, but they overlook that management groups control scope, not identity membership.