Managing user access within an organization is a pivotal part of IT operations. Among the most efficient platforms for managing user roles and permissions is Microsoft Entra ID, formerly known as Azure Active Directory. This service allows administrators to assign roles to users via groups, streamlining role-based access control (RBAC). Administrators can perform these tasks through the Microsoft Entra portal or automate them using PowerShell.
This article details the process of assigning roles in Entra groups using both PowerShell and the portal, highlighting when each method might be more appropriate and how to ensure best practices are followed in your organization.
The Benefits of Role Assignments via Groups
Rather than assigning roles to individual users, leveraging groups for role assignments simplifies management. Changes in a user’s job responsibilities can be enacted by moving them between groups. This reduces repetitive administrative workload and ensures consistency across the environment.
- Scalability: Ideal for large organizations with frequent personnel changes.
- Simplified Auditing: Role management is easier to track when done through group assignments.
- Minimizes Errors: Limits direct role assignments to individuals, reducing the risk of privilege misconfiguration.
The two most common ways to assign roles in Entra groups are:
- Via the Microsoft Entra Admin Center Portal
- Using PowerShell with appropriate permissions
Assigning Roles Using the Microsoft Entra Portal
The Microsoft Entra Portal offers a user-friendly interface for administrators to manage groups and assign roles. Follow these steps to assign a role to a group:
- Sign in to the Microsoft Entra Admin Center.
- In the left navigation pane, choose Groups.
- Select the group to which you’d like to assign a role.
- Click on Assigned roles and then select + Add assignments.
- Pick the desired role and confirm the assignment.
Once assigned, all members of that group inherit the specified role, making it a powerful tool for administrative delegation and policy enforcement.

Assigning Roles with PowerShell
For organizations that rely on scripting for automation or bulk updates, PowerShell offers a flexible and powerful alternative to the portal. Here’s how an admin can assign a role using the Microsoft Graph PowerShell module:
- Install the Graph PowerShell module (if not already present):
- Connect to Microsoft Graph:
- Find the group and role IDs needed for the assignment:
- Assign the role to the group:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory"
# Get group ID
Get-MgGroup -Filter "displayName eq 'GroupName'"
# Get role definition ID
Get-MgDirectoryRoleDefinition -Filter "displayName eq 'RoleName'"
New-MgRoleManagementDirectoryRoleAssignment -PrincipalId 'GroupObjectId' -RoleDefinitionId 'RoleDefinitionId' -DirectoryScopeId '/'
Remember to replace ‘GroupName’, ‘RoleName’, ‘GroupObjectId’, and ‘RoleDefinitionId’ with the actual values relevant to your organization.

Best Practices for Role Assignments
- Least Privilege: Always assign the minimum roles necessary for users to perform their tasks.
- Regular Audits: Periodically review group memberships and assigned roles to detect unwanted privilege escalations.
- Naming Conventions: Use standardized naming for groups to quickly identify their function and assigned roles.
- Documentation: Maintain clear documentation of role assignments to aid troubleshooting and onboarding.
By strategically using the portal or PowerShell, IT teams can ensure secure and manageable access control, directly aligned with organizational policies.
Frequently Asked Questions (FAQ)
- Can I assign roles to nested groups in Entra?
No. Microsoft Entra does not support role inheritance through nested groups. Only direct group members receive the assigned roles. - Is PowerShell required for all bulk role assignments?
While small-scale assignments can be handled in the portal, PowerShell is more efficient for bulk operations and automation. - Do group-based role assignments take effect immediately?
Typically, yes. However, it may take a few minutes to propagate across the directory in larger environments. - Are dynamic groups supported for role assignments?
Yes. Dynamic groups can be used for role assignments, which is ideal for automating role-based access based on user attributes. - What permissions are needed to assign roles via PowerShell?
The administrator must have the appropriate directory role, such as Global Administrator or Privileged Role Administrator, to assign roles.