Lesson 2 of 5 Microsoft Entra Users and Groups

Managing User and Group Properties

User attributes and group settings drive dynamic membership, licensing and access. This lesson explains the properties that matter, dynamic rules, group owners and restoring deleted objects.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how user attributes are used by dynamic groups and licence assignment.
  • Describe how dynamic membership rules are evaluated and what changing a group's membership type does.
  • Identify which deleted users and groups can be restored and for how long.

User properties that matter

A user's profile includes identity attributes (display name, UPN, user type), job information (job title, department, company name, manager, employee ID), contact information and settings such as usage location and block sign-in. These attributes are not only descriptive. Dynamic group rules read them, licence assignment requires the usage location, Conditional Access policies can target users by group, and the manager attribute builds the organization chart used by access reviews and approvals.

For synchronized users, most attributes are mastered on-premises and appear read-only in the portal; changes must be made in Active Directory and synchronized. Properties can be edited in the portal, with Update-MgUser in Microsoft Graph PowerShell, or with az ad user update. Blocking sign-in stops new sign-ins while keeping the account, its group memberships and its licences, which is useful when someone leaves temporarily.

Dynamic membership rules

A dynamic rule is an expression on user or device properties, such as (user.department -eq "Sales") -and (user.country -eq "France"). Operators include -eq, -ne, -startsWith, -contains, -match and -in. The rule builder in the portal creates simple rules, and the text editor allows complex ones; Validate rules checks the rule against sample users before saving.

Microsoft Entra ID re-evaluates the rule whenever a user's attributes change, and processing can take from minutes to several hours in large tenants. Members of a dynamic group cannot be added or removed manually. The membership type can be changed: converting a dynamic group to assigned keeps the current members, and converting an assigned group to dynamic replaces the members with the rule's results. Dynamic membership requires Microsoft Entra ID P1 licences for the users in scope.

The following diagram shows why a user whose department attribute ends with a space is left out of a dynamic group, and how a synchronized user's attribute is corrected.

Why a new sales manager is missing from the dynamic group. The rule compares the exact value, and the user's department is “Sales ” with a trailing space, so the rule excludes them. Because the user is synchronized from on-premises Active Directory, the attribute is corrected there and synchronized, not edited in the portal.
The scenario is illustrative.
True or false

How dynamic groups behave

Exam skills 1.1.2

Check what happens to members when dynamic rules and membership types change.

Log in to try this activity Interactive activities are free with an account.

Owners, nesting and deleted objects

Group owners manage an assigned group's membership and properties without any administrator role, which delegates routine membership work to team leads. Security groups can contain other groups (nesting), and Azure role assignments to a parent group apply to members of nested groups, but some features, such as group-based licensing and some application assignments, do not support nested membership.

Deleted users and deleted Microsoft 365 groups go to a soft-deleted state for 30 days, during which they can be restored with their attributes and memberships; afterwards they are permanently deleted. Deleted security groups are deleted permanently and cannot be restored, so their role assignments must be recreated.

Scenario questions

Owners, nesting and recovery

Exam skills 1.1.2

Apply the rules for group owners, nested groups and deleted objects.

Log in to try this activity Interactive activities are free with an account.
Worked example

A user missing from a dynamic group

A new sales manager cannot open the Sales resource group. The Reader role is assigned to the dynamic group Sales-Users with the rule (user.department -eq "Sales"). The user's department attribute is "Sales " with a trailing space, and the user was synchronized from on-premises Active Directory. What should you do?

Correct the department attribute in on-premises Active Directory and let it synchronize. The rule compares the exact value, so the trailing space excludes the user, and because the user is synchronized, the attribute cannot be edited in the portal. Adding the user to the group manually is not possible for a dynamic group, and assigning Reader directly to the user would work but bypasses the group design.

Check yourself

Can a deleted security group be restored from the Deleted groups list?

Show answer

No. Only deleted users and Microsoft 365 groups are kept for 30 days; deleted security groups are removed permanently.

Exam Tips

Remember for the exam

  • Synchronized users' attributes are changed on-premises, not in the portal.
  • Deleted users and Microsoft 365 groups can be restored for 30 days; deleted security groups cannot.
  • Group owners can manage membership without an administrator role.
  • Converting a group to dynamic replaces its members with the rule's results.