Group Management & Dynamic Membership
SC-300 Exam Alignment
SC-300
Implement and manage user identities: Create and manage group types, configure dynamic membership rules, implement group-based licensing, and manage group expiration policies.
- Know the four group types (Security, Microsoft 365, Mail-enabled Security, Distribution) and their use cases
- Understand Assigned vs Dynamic User vs Dynamic Device membership — and which licence is required for Dynamic
- Write and interpret dynamic membership rule syntax using property-operator-value expressions
- Know how group-based licensing works and what happens when a user joins or leaves a group
- Know that group expiration requires Entra ID P1 and what happens when owners do not renew
📋 Group Types in Microsoft Entra ID
| Group Type | Purpose | Email? | Membership | Created in |
|---|---|---|---|---|
| Security group | Assign permissions to resources — SharePoint, apps, Azure RBAC. No email capability | ❌ | Assigned or Dynamic | Entra ID or on-prem AD (synced) |
| Microsoft 365 Group | Collaboration — creates shared mailbox, SharePoint site, Teams workspace, Planner. Can be connected to a Team | ✅ | Assigned or Dynamic | Entra ID, Exchange, Teams, SharePoint |
| Mail-enabled security group | Assign permissions AND receive email. Cannot use for dynamic membership | ✅ | Assigned only | Exchange admin center → synced to Entra |
| Distribution group | Email distribution list only — no permission assignment capability | ✅ | Assigned only | Exchange admin center |
💡 Key Distinction — Security vs Microsoft 365 Groups
- Security groups are for access control — used to assign permissions, licences, app access, and CA policy scope
- Microsoft 365 Groups are for collaboration — they provision a whole suite of connected workloads (Teams, SharePoint, Exchange, Planner, Viva Engage)
- Both Security and Microsoft 365 groups support Dynamic membership rules (requires P1)
- Mail-enabled security and distribution groups do NOT support dynamic membership
🔄 Membership Types
| Membership Type | How It Works | Licence Required |
|---|---|---|
| Assigned | Members added and removed manually by an administrator or group owner | Free (included) |
| Dynamic User | Membership determined automatically by a rule evaluated against user attributes (department, country, job title, etc.). Users are added or removed automatically as their attributes change | Entra ID P1 |
| Dynamic Device | Membership determined by device attributes (device type, OS, compliance state). Used primarily for Intune device targeting | Entra ID P1 |
⚡ Dynamic Membership Rules
Dynamic membership rules use a property-operator-value syntax to define which users automatically belong to a group. The rule is evaluated continuously — users are added or removed as their attributes change.
Entra admin center › Identity › Groups › [group] › Dynamic membership rules
| Scenario | Dynamic Rule |
|---|---|
| All users in the HR department | user.department -eq "HR" |
| Users in UK or Ireland | user.country -in ["GB","IE"] |
| All member users (not guests) | user.userType -eq "Member" |
| All guest users | user.userType -eq "Guest" |
| Users whose title starts with "Senior" | user.jobTitle -startsWith "Senior" |
| HR users in London | (user.department -eq "HR") -and (user.city -eq "London") |
| Users NOT in the IT department | user.department -ne "IT" |
| Users with manager attribute set | user.manager -ne null |
⚠️ Dynamic Rule Processing Time
When a dynamic rule is first set or a user attribute changes, Entra ID processes the rule evaluation. Small tenants may update within minutes; large tenants (100,000+ users) can take up to 24 hours. Use the Validate rules feature in the portal to test a rule against specific users before saving it to the group.
📦 Group-Based Licensing
Group-based licensing (requires Entra ID P1) allows administrators to assign Microsoft 365 licences to a group. Every member of the group automatically receives that licence. When a user is removed from the group, the licence is automatically removed.
Entra admin center › Identity › Groups › [group] › Licences
✅ Combining Dynamic Groups + Group-Based Licensing
The most powerful pattern: create a dynamic Security group with a rule like user.department -eq "HR", then assign your HR staff licence to that group. When a new HR hire is created with the correct Department attribute, they automatically join the group and receive the licence — no manual intervention needed. When they leave HR (department changes) or leave the company, the licence is removed automatically.
⏰ Group Expiration Policies
Group expiration (requires Entra ID P1) lets administrators set a lifetime for Microsoft 365 Groups. Group owners receive email notifications at 30, 15, and 1 day before expiry. If no renewal happens, the group is soft-deleted and can be restored within 30 days.
| Setting | Options | Notes |
|---|---|---|
| Group lifetime | 180 / 365 / Custom (days) | Applies to all or selected Microsoft 365 Groups in the tenant |
| Renewal notification email | Sent to group owners | At 30, 15, and 1 day before expiry — owners can renew in one click |
| Auto-renew on activity | Enabled by default | If the group has activity (Teams messages, SharePoint edits, emails) it auto-renews without owner action |
| On expiry | Group is soft-deleted | Restorable for 30 days, then permanently deleted |
Connect-MgGraph -Scopes 'Group.ReadWrite.All' # Create a Security group with dynamic membership New-MgGroup -DisplayName 'HR Department' -MailEnabled:\$false -MailNickname 'hr-dept' -SecurityEnabled:\$true -GroupTypes 'DynamicMembership' -MembershipRule 'user.department -eq "HR"' -MembershipRuleProcessingState 'On' # Create a Microsoft 365 Group (Unified) New-MgGroup -DisplayName 'Marketing Team' -MailEnabled:\$true -MailNickname 'marketing-team' -SecurityEnabled:\$false -GroupTypes 'Unified' # List all dynamic groups and their rules Get-MgGroup -Filter "groupTypes/any(c:c eq 'DynamicMembership')" | Select-Object DisplayName,MembershipRule # List members of a group Get-MgGroupMember -GroupId '<group-id>' | ForEach-Object { Get-MgUser -UserId \$_.Id | Select-Object DisplayName,UserPrincipalName }
💡 Best Practices
- Use dynamic groups for department, location, or role-based access — eliminates the operational overhead of manually maintaining group membership as your organisation grows
- Assign licences to groups rather than individual users — group-based licensing creates a consistent, auditable, and automated licence management process
- Always validate dynamic rules using the built-in Validate rules tool before saving — a wrong rule can incorrectly add or remove hundreds of users from licensed or privileged groups
- Enable group expiration for Microsoft 365 Groups to prevent accumulation of orphaned Teams, SharePoint sites, and shared mailboxes that are no longer actively used
- Use naming policies (Entra admin center → Identity → Groups → Naming policy) to enforce consistent group name prefixes or suffixes (e.g., GRP-HR-London) making groups easier to govern at scale
🎓 Interview Q&A
user.department -eq "Finance", the exact casing and spelling of the Department attribute on the user must match. Second, if the group processes a large tenant (hundreds of thousands of users), evaluation can take up to 24 hours. Third, the user may not have had the Usage location set, which could impact certain attributes. Fourth, dynamic membership requires Entra ID P1 — if the licence has lapsed, rule processing stops. You can check the rule evaluation status on the group's Dynamic membership rules blade and use the Validate rules feature to test the specific user against the rule.An administrator needs to create a group that automatically includes all users whose Department attribute is "Sales" and automatically removes them when their department changes. Which group type and membership should they use?
An organisation wants to automatically assign Microsoft 365 E3 licences to all employees in the London office. What is the most scalable approach?
Which dynamic rule correctly includes all guest users in a group?
A Microsoft 365 Group has an expiration policy of 180 days. The group owners did not renew it. What happens immediately after the expiry date?
An administrator needs to create a group that can both receive emails sent to a distribution list AND be used to assign permissions to a SharePoint site. Which group type meets both requirements?