Creating and Managing Groups

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 12 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Creating and Managing Groups in Microsoft Entra ID

Introduction: Why Identity Grouping Matters

In the landscape of modern cloud infrastructure, managing individual user permissions is a recipe for operational chaos. If you have 500 employees and you need to grant them access to a shared project folder, manually assigning that permission to every single user account is not only tedious but highly prone to human error. This is where the concept of identity grouping comes into play. By using Microsoft Entra ID (formerly Azure Active Directory) groups, you move away from managing individual users and toward managing functional roles or departments.

Groups act as containers for users and other groups, allowing you to apply policies, access rights, and configurations to a collection of identities all at once. When a new team member joins your organization, you don't need to hunt down every application or file share they need access to; you simply add them to the relevant groups, and their permissions are inherited automatically. This approach is the cornerstone of efficient identity governance and security, ensuring that access is consistent, auditable, and easy to revoke when necessary.

Understanding how to create and manage these groups is a fundamental skill for any Azure administrator. Beyond simple organization, groups are the vehicles for "Role-Based Access Control" (RBAC) and conditional access policies. This lesson will guide you through the technical mechanics of group management, the different types of groups available, and the best practices for maintaining a clean and secure directory.


Not read yet

Understanding Group Types and Assignments

Before you start clicking the "Create" button in the Azure portal, it is vital to understand the two primary group types in Microsoft Entra ID: Security groups and Microsoft 365 groups. While they might look similar in the interface, they serve fundamentally different purposes in your environment.

Security Groups

Security groups are the workhorses of access management. Their primary purpose is to grant access to resources like SharePoint sites, Azure resources, and third-party SaaS applications. They can contain users, devices, and even other groups. When you create a security group, you are essentially defining a "security principal" that can be referenced in access control lists (ACLs) or role assignments.

Microsoft 365 Groups

Microsoft 365 groups are designed for collaboration. When you create one, it doesn't just create a group identity; it provisions a suite of resources, including a shared mailbox, a SharePoint site, a calendar, and a planner board. These groups are meant for teams that need to work together on projects. While they can still be used for security purposes, they are more resource-heavy and come with additional overhead that you might not need if your only goal is managing access to a specific Azure subscription.

Callout: Security Groups vs. Microsoft 365 Groups The distinction lies in intent. Use Security groups when your goal is strictly access management and permission assignment. Use Microsoft 365 groups when your goal is to provide a team with a workspace, including shared communication and file storage tools. Mixing these intents often leads to "group sprawl," where users have access to resources they don't need or aren't aware of.


Not read yet

Membership Types: Assigned vs. Dynamic

Once you decide on the group type, you must decide how members are added. This is the most significant decision for long-term maintenance.

Assigned Membership

With assigned membership, you manually add users to the group. This is appropriate for small, static teams where membership changes infrequently. However, in large organizations, manual assignment is a common point of failure. Admins often forget to remove users who have left a project or switched departments, leading to "permission creep," where users retain access to sensitive systems long after they should have lost it.

Dynamic Membership

Dynamic groups use rules based on user properties to manage membership automatically. For example, you can create a rule that says "all users with the Department attribute equal to 'Engineering' are members of the Engineering group." When a new engineer is hired and their profile is updated, they are added to the group automatically. When they leave, they are removed. This removes the human element from group maintenance, significantly improving your security posture.


Not read yet

Step-by-Step: Creating Groups in the Azure Portal

For most administrators, the Azure portal is the primary interface for managing groups. Here is the step-by-step process for creating a security group.

  1. Navigate to Entra ID: Log into the Azure Portal and search for "Microsoft Entra ID."
  2. Select Groups: In the left-hand navigation pane, click on "Groups," then click "All groups."
  3. Initiate Creation: Click the "+ New group" button at the top of the screen.
  4. Configure Basics:
    • Group type: Choose "Security."
    • Group name: Provide a descriptive name (e.g., App_Finance_Readers).
    • Group description: Be specific. Mention what this group grants access to.
    • Azure AD roles can be assigned to the group: This is a crucial toggle. If you want this group to be able to manage Azure roles, you must select "Yes" here. Note that this cannot be changed later.
  5. Membership Type: Choose "Assigned" for manual control or "Dynamic User" for rule-based membership.
  6. Review and Create: If you chose "Dynamic," you will now define your query. Click "Add dynamic query," select the property (e.g., department), the operator (e.g., equals), and the value (e.g., Finance). Once satisfied, click "Create."

Tip: Naming Conventions Establish a naming convention for your groups immediately. Use prefixes like App_, Dept_, or Role_ to make it clear what the group is for. For example, Dept_Marketing is clearly a department-based group, whereas App_Payroll_Access is clearly linked to a specific application. This simple step prevents confusion as your directory grows to hundreds or thousands of groups.


Not read yet

Managing Groups via Microsoft Graph PowerShell

While the portal is great for visual tasks, automation is the key to scalability. Using the Microsoft Graph PowerShell SDK allows you to create and manage groups programmatically, which is essential for auditability and consistency.

Installing the SDK

Before you can run commands, you need to install the Microsoft Graph module. Open PowerShell as an administrator and run:

Install-Module Microsoft.Graph -Scope CurrentUser

Creating a Group with PowerShell

Once connected, you can create a security group with a simple command. This is significantly faster than navigating the portal menus.

# Connect to your tenant
Connect-MgGraph -Scopes "Group.ReadWrite.All"

# Define the group parameters
$params = @{
    DisplayName = "Project_Alpha_Team"
    MailEnabled = $false
    SecurityEnabled = $true
    MailNickname = "ProjectAlpha"
    Description = "Access for the Project Alpha engineering team"
}

# Create the group
New-MgGroup @params

Managing Membership via PowerShell

Adding a user to a group is equally straightforward. You need the groupId and the userId (or userPrincipalName).

# Add a user to the group
$groupId = "your-group-id-here"
$userPrincipalName = "jane.doe@yourdomain.com"

New-MgGroupMember -GroupId $groupId -DirectoryObjectId $userPrincipalName

Warning: Scope and Permissions Be careful with the permissions you grant to your PowerShell session. The Group.ReadWrite.All scope is powerful. Always use the principle of least privilege. If you are only creating groups, do not use an account with Global Administrator rights; use an account with the "Groups Administrator" role.


Not read yet

Best Practices for Group Management

Managing groups is not a one-time setup activity. It is an ongoing lifecycle process. If you treat your groups as "set it and forget it," you will inevitably end up with a cluttered, insecure directory.

Implement Group Expiration Policies

Microsoft Entra ID allows you to set expiration policies for Microsoft 365 groups. This requires group owners to renew the group periodically. If they don't, the group is deleted. This is an excellent way to prune unused resources automatically.

Use Access Reviews

Access reviews are a built-in feature of Entra ID Governance. They allow you to periodically ask group owners or managers to verify that the members of their groups still require access. If a manager says "No," the user is automatically removed. This is the industry standard for maintaining compliance and security.

Limit Group Creation Rights

By default, all users in your directory might be able to create Microsoft 365 groups. In a large organization, this leads to "shadow IT," where users create dozens of duplicate or unnecessary groups. You should restrict group creation to a specific group of users or administrators.

Monitor Group Activity

Regularly export a list of your groups and check for ones that haven't been modified in a long time. If a group has no members or hasn't been used for access in a year, it is likely safe to delete. Always back up or archive the data if necessary before deletion.


Not read yet

Common Pitfalls and How to Avoid Them

1. The "Kitchen Sink" Group

A common mistake is creating a single group that covers too many things. For example, creating a group called All_Employees and using it for everything from file access to payroll system permissions. If an intern joins, they are added to All_Employees and suddenly gain access to sensitive payroll data.

  • Solution: Break groups down by function. Use a hierarchy where All_Employees might be used for company-wide announcements, but Payroll_Access is a separate, highly restricted group.

2. Lack of Group Owners

Every group should have at least one, preferably two, owners. If a group has no owner, it becomes "orphaned." No one knows who is responsible for it, and no one knows who should be in it.

  • Solution: Make it a policy that every new group must have an assigned owner who is accountable for its membership.

3. Ignoring Dynamic Group Rule Limits

Dynamic groups are powerful, but they have limits on how many groups you can have and how complex the rules can be. If you try to build a massive, nested dynamic rule, it may fail to process correctly.

  • Solution: Keep your dynamic rules simple. If you need complex logic, consider using multiple groups and combining them or using an identity governance tool to orchestrate the membership.

4. Over-reliance on Nested Groups

Nesting groups (putting a group inside another group) can make permissions very difficult to debug. If a user is a member of Group A, which is inside Group B, which has access to the Server, it can be hard to track why they have access.

  • Solution: Avoid nesting if possible. It is better to have a flat structure where a user is a member of exactly the groups they need. If you must use nesting, keep it to a single level.

Not read yet

Comparison Table: Membership Strategies

Feature Assigned Membership Dynamic Membership
Effort High (Manual) Low (Automated)
Accuracy Prone to human error High (Based on data)
Use Case Small, ad-hoc teams Large, department-based teams
Scalability Poor Excellent
Maintenance Constant manual updates Automated via attribute changes

Advanced Topic: Group-Based Licensing

One of the most useful features of Microsoft Entra ID is Group-Based Licensing. Instead of manually assigning licenses (like Microsoft 365 E3 or E5) to every user, you assign the license to a group.

When you add a user to the group, they automatically receive the licenses associated with that group. When you remove them, the licenses are reclaimed. This is a massive time-saver for IT departments, as it eliminates the need to track license counts manually.

Implementing Group-Based Licensing

  1. Navigate to Licenses: In the Entra ID portal, go to "Licenses" and then "All products."
  2. Select a Product: Click on the product you want to license (e.g., Office 365 E3).
  3. Assign: Click "Assign" and select the group you want to license.
  4. Configure Options: You can toggle specific apps (like Teams or SharePoint) on or off for that group.

Note: Licensing Conflicts Be aware that if a user is in two groups that both assign the same license, they will only receive one license. However, if they are in two groups that assign different, overlapping features, the union of those features will be applied. Always test licensing changes on a small pilot group before rolling them out to the entire organization.


Not read yet

Security Considerations for Groups

Groups are security principals, which means they are a target for attackers. If an attacker compromises a user account that happens to be an owner of a privileged group, they can add themselves or other malicious actors to that group to escalate their privileges.

Privileged Identity Management (PIM)

For highly sensitive groups (like those with Global Administrator or specialized access), you should use Microsoft Entra Privileged Identity Management. PIM allows you to make membership "eligible" rather than "permanent." A user has to request access to the group, provide a justification, and potentially undergo multi-factor authentication before they are added to the group for a limited amount of time.

Auditing

Always enable diagnostic settings to send your Entra ID logs to a Log Analytics workspace. You should create alerts for "Group Member Added" events, especially for groups that control sensitive resources. If you see a user being added to a sensitive group at 3:00 AM from an unknown location, you want to know about it immediately.


Not read yet

Troubleshooting Group Issues

Even with the best planning, things can go wrong. Here is how to handle the most common issues:

"The user isn't getting access"

  • Check Membership: Is the user actually in the group? Verify in the portal.
  • Check Propagation Time: Sometimes it takes a few minutes for group membership changes to sync across Microsoft's global services. Wait 10-15 minutes.
  • Check Nesting: If the user is in a child group, does the parent group have the correct permissions?
  • Check Conditional Access: Does the user meet the requirements of any Conditional Access policies that might be blocking them, even if they have the correct group permissions?

"The dynamic group rule isn't working"

  • Check the Attribute: Is the user's attribute (e.g., department) actually populated in their profile?
  • Check the Syntax: Is your rule syntax correct? You can use the "Validate Rules" feature in the dynamic group configuration to test a specific user against your rule.
  • Check Processing Status: Look at the "Dynamic membership rules" tab. It will tell you if the rule is currently processing or if there is an error.

Not read yet

Key Takeaways

As you wrap up this lesson on managing Microsoft Entra groups, keep these core principles in mind:

  1. Groups are for Access, not just Organization: Always design groups with a clear purpose (e.g., "Access to Finance App") rather than just organizational structure.
  2. Automation over Manual Labor: Whenever possible, use dynamic membership rules. It reduces the chance of human error and ensures that access is kept up-to-date automatically.
  3. Naming Conventions are Mandatory: A messy directory leads to security holes. Use a consistent naming scheme from day one.
  4. Principle of Least Privilege: Only add users to groups that they absolutely need for their job. Never create "super-groups" that grant access to everything.
  5. Lifecycle Management is Key: Use access reviews and expiration policies to ensure that groups don't outlive their usefulness.
  6. Secure Your Owners: Treat group owners as privileged users. If a group controls sensitive data, the owner of that group should be subject to strict security policies.
  7. Audit and Monitor: You cannot secure what you do not watch. Set up alerts for changes to your most critical groups and review logs regularly.

By mastering these concepts, you transition from a reactive administrator who spends time fixing permission issues to a proactive architect who builds a secure, scalable, and efficient identity environment. Group management is the foundation of your identity governance strategy—treat it with the care it deserves.


Not read yet

Frequently Asked Questions (FAQ)

Can I change a group from "Assigned" to "Dynamic"?

Yes, you can change the membership type of a group at any time. However, be aware that when you switch to dynamic membership, all existing manually added members will be removed, and the dynamic rule will take over.

What is the maximum number of members a group can have?

Microsoft Entra ID supports groups with very large numbers of members. For most practical purposes, you will not hit the limit, but be aware that extremely large groups (tens of thousands of members) can take longer to process membership changes.

Are there limits on the number of groups I can create?

Yes, there are limits on the total number of objects in your directory. While these limits are quite high for most organizations, you should still avoid creating unnecessary groups to keep your directory clean and performant.

Can I use groups to manage external (guest) users?

Absolutely. You can add guest users to your groups just like internal users. This is a common way to grant partners or contractors access to specific resources without giving them full access to your internal environment.

What happens if I delete a group?

If you delete a group, all permissions and access associated with that group are immediately revoked. This is a powerful action, so be careful. Deleted groups can generally be restored within 30 days, but it is always better to be certain before clicking delete.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.