Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 1 of 47
Next❯

Microsoft Entra Users and Groups: Create and Manage

Module 1: Identity & Governance ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    In Microsoft Entra ID you create users (members of your tenant, identified by a user principal name such as sam@contoso.com) and groups that collect them. A group is either a Security group (for access) or a Microsoft 365 group (for collaboration), and its membership type is Assigned (you add people), Dynamic User or Dynamic Device (a rule like user.department -eq "Sales" adds and removes members). Dynamic groups need Microsoft Entra ID P1. You edit user properties such as department, job title and usage location on the user's blade, in bulk from a CSV, or with Microsoft Graph PowerShell.

    Simulate it » No Azure account needed

    Exam objective: 1.1.1 Create users and groups. 1.1.2 Manage user and group properties. (Skills measured as of April 17, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Create a user and a dynamic group in Microsoft Entra ID Create a user, then a dynamic group with a rule.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Open <strong>Microsoft Entra ID</strong>. You can do the same in the Microsoft Entra admin center (entra.microsoft.com); the blades match.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open Microsoft Entra ID. You can do the same in the Microsoft Entra admin center (entra.microsoft.com); the blades match.
    2. Open Users and select + New user → Create new user. Bulk operations does the same from a CSV file for many people at once.
    3. The user principal name is the sign-in name. The auto-generated password must be changed at first sign-in.
    4. Department will drive a dynamic group in a minute. Usage location is required before you can license the user directly.
    5. Review and Create. CLI: az ad user create --display-name "Sam Rivera" --user-principal-name sam@contoso.onmicrosoft.com --password …
    6. Now Groups → + New group.
    7. Membership type can be Assigned (you add people), Dynamic User or Dynamic Device (a rule adds them). Dynamic groups need Microsoft Entra ID P1. Select Add dynamic query.
    8. The rule (user.department -eq "Sales") adds Sam, and anyone else in Sales, automatically. Change someone's department and they leave the group on their own.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Forty new sales hires start Monday and someone has to set up every account by hand.

    😊 THE SOLUTION

    Create users in bulk and let a dynamic group add them by department.

    • One account at a time✓ Bulk create from a CSV
    • Group membership drifts✓ Dynamic membership rules
    • Leavers keep access✓ Disable the account; groups follow
    🛠️ Solved with: Microsoft Entra users and groups

    Start with a question

    How does a company with 3,000 staff keep track of who belongs to which team?

    Think of a school office. Every pupil has a record card with their name, class and house. The office doesn’t write “Year 7 football team” on each card by hand every term. It keeps one list per club, and some lists are just “everyone in Year 7”, which updates itself when a new pupil arrives.

    Microsoft Entra ID is that office for a company. Each person has a user account with properties like department and job title. Groups are the lists. Some you keep by hand (assigned), and some fill themselves from a rule on those properties (dynamic).

    Explain it like I’m 10

    The technical explanation

    Users

    A user lives in your tenant and signs in with a user principal name (UPN), such as sam@contoso.onmicrosoft.com or sam@contoso.com once you’ve added a custom domain. Users are either Members (your staff) or Guests (people from other organisations, covered in the next lesson). They’re created in one of three ways:

    • Cloud-only: you create them in the Azure portal (Microsoft Entra ID → Users → + New user → Create new user) or the Microsoft Entra admin center.
    • Synced: Microsoft Entra Connect or Cloud Sync copies them from on-premises Active Directory. You edit those in AD, not in the cloud.
    • Bulk: Bulk operations → Bulk create takes a CSV template, which suits a big intake.

    The Create new user wizard has four tabs: Basics (UPN, mail nickname, display name, password, account enabled), Properties (first and last name, user type, job title, department, company, manager, usage location), Assignments (groups, roles, administrative units) and Review + create.

    # Azure CLI
    az ad user create --display-name "Sam Rivera" \
      --user-principal-name sam@contoso.onmicrosoft.com \
      --password "<temporary-password>" --force-change-password-next-sign-in true
    
    az ad user update --id sam@contoso.onmicrosoft.com --account-enabled false   # block sign-in
    az ad user list --query "[].{name:displayName, upn:userPrincipalName}" -o table
    # Microsoft Graph PowerShell: properties the CLI doesn't expose
    Update-MgUser -UserId sam@contoso.onmicrosoft.com -Department "Sales" -JobTitle "Account Executive" -UsageLocation "IN"

    Deleted users go to Deleted users for 30 days, and you can restore them in that window with their group memberships.

    Groups

    When you select + New group you choose:

    SettingOptionsWhy it matters
    Group typeSecurity or Microsoft 365Security for access; Microsoft 365 adds a mailbox, calendar and SharePoint site
    Microsoft Entra roles can be assigned to the groupYes / NoMust be set at creation if the group will hold Entra roles. It can’t be changed later
    Membership typeAssigned, Dynamic User, Dynamic DeviceWho manages the member list: you or a rule
    OwnersUsersOwners can manage the group without being admins
    az ad group create --display-name App-Ops --mail-nickname app-ops
    az ad group member add --group App-Ops --member-id <user-object-id>
    az ad group member list --group App-Ops -o table

    Dynamic membership rules

    A dynamic group uses a rule built from property, operator, value. The rule builder writes the syntax for you, or you type it:

    (user.department -eq "Sales")
    (user.department -eq "Sales") -and (user.usageLocation -eq "IN")
    (user.jobTitle -startsWith "Engineer")
    (device.deviceOSType -eq "Windows")

    A group is Dynamic User or Dynamic Device, never both. Rules are evaluated in the background, so changes can take a while to show. You can’t add or remove members by hand; you change the property instead. Dynamic groups need a Microsoft Entra ID P1 license for each user in scope.

    1. 1 HR updates

      Sam's department changes from Marketing to Sales.

    2. 2 Rule runs

      Entra ID re-evaluates (user.department -eq "Sales").

    3. 3 Membership

      Sam joins Sales-Team and leaves the Marketing dynamic group.

    4. 4 Access follows

      Roles, apps and licenses tied to the group now apply to Sam.

    Sam moves to the sales team
    Architect level Who can manage users and groups?

    You don’t need Global Administrator for daily work. User Administrator creates and edits users and groups and resets passwords for non-admins. Groups Administrator manages groups only. Helpdesk Administrator resets passwords for non-admins. Group owners manage their own group’s members. Use administrative units to limit an admin to one region or department’s users. These are Microsoft Entra roles, separate from the Azure roles you’ll meet in the RBAC lessons.

    Real-world business scenario

    Retail

    Contoso Retail (fictional)

    The problem
    Every month IT created 60 store and office accounts by hand and forgot to add half of them to the right groups, so new staff waited days for app access.
    What they used
    Bulk create from HR's CSV with department, job title and usage location filled in, plus a dynamic security group per department (for example user.department -eq 'Stores') that grants app access and licenses.
    Why that choice
    New hires land in the right groups the moment their account exists, and transfers fix themselves when HR changes the department.
    The result
    Day-one access went from a 3-day wait to under an hour, and access reviews found far fewer leftover memberships.

    When to use it and when not to

    ✓ Use it when…

    • Membership follows a property HR maintains, such as department, office or job title (dynamic).
    • A small, hand-picked team or approver list (assigned).
    • Many users arriving at once (Bulk create from CSV).

    ✕ Think twice when…

    • Dynamic groups when the property data is messy or empty. Fix the data first.
    • Editing synced users in the cloud. Change them in on-premises Active Directory.
    • Giving every admin Global Administrator. Use User Administrator or Groups Administrator.

    ↔ Alternatives to consider

    • Microsoft Entra Connect or Cloud Sync when users already live in Active Directory.
    • HR-driven provisioning (Workday, SuccessFactors or the inbound provisioning API) for joiner-mover-leaver automation.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    You need to ensure that users are added to a group automatically when their Department attribute is set to Sales, and removed when the attribute changes. What should you configure?

    Question 2

    Question 2 of 5

    Your organization plans to use dynamic groups in Microsoft Entra ID. Which license is required for the users who are members of the dynamic groups?

    Question 3

    Question 3 of 5

    An administrator attempts to add User1 to a group named Sales-Team, but the Add members option is unavailable. Other groups accept new members. What is the most likely cause?

    Question 4

    Question 4 of 5

    You need to create 400 cloud-only user accounts from a spreadsheet provided by HR with the least administrative effort. What should you use?

    Question 5

    Question 5 of 5 · Select 2

    You need to create a group that can be assigned the Helpdesk Administrator Microsoft Entra role. Which two settings must be configured when you create the group? Each correct answer presents part of the solution.

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner What's the difference between a security group and a Microsoft 365 group?

    Model answer

    A security group is for access: you give it Azure roles, app access or file permissions. A Microsoft 365 group is for teamwork: it comes with a shared mailbox, calendar, SharePoint site and can back a Teams team. Both can hold users, and either can have assigned or dynamic membership.

    Intermediate When would you use a dynamic group instead of an assigned one?

    Model answer

    When membership follows a property that HR already keeps up to date, like department or location. With a rule such as user.department -eq "Sales", new sales hires join on day one and people who move teams drop out automatically. I'd keep assigned groups for small, hand-picked sets like a project team or an approvers list.

    Experienced developer A user's department was changed but they still aren't in the dynamic group. What would you check?

    Model answer

    First the rule itself, on the group's Dynamic membership rules blade, using Validate rules against that user. Then the processing state: it must be On, not Paused. Then time: dynamic membership is evaluated in the background and can take a while in a big tenant. And the licence: dynamic groups need Entra ID P1 for the users in scope.

    Scenario Forty new hires start on Monday. How would you set them up?

    Model answer

    I'd use Bulk operations, Bulk create, with the CSV template filled from HR's list, including department, job title and usage location. A dynamic group per department then picks them up, and group-based licensing on those groups gives them Microsoft 365. If HR sync is available, I'd use API-driven or HR inbound provisioning instead of CSVs.

    Quick revision

    Key points

    • Users are members or guests. Create them in the portal, the Entra admin center, in bulk from CSV, or with az ad user create.
    • Group type is Security or Microsoft 365. Membership type is Assigned, Dynamic User or Dynamic Device.
    • Dynamic rules use user properties, for example (user.department -eq "Sales"), and need Microsoft Entra ID P1.
    • You can't add or remove members of a dynamic group by hand.
    • Edit properties (department, job title, usage location, manager) on the user's Properties tab or with Update-MgUser.

    Important terminology

    Tenant
    Your organisation's dedicated instance of Microsoft Entra ID, with its own users, groups and domains.
    User principal name (UPN)
    The sign-in name of a user, in the form name@domain, such as sam@contoso.onmicrosoft.com.
    Member user
    A user who belongs to your organisation, as opposed to a guest from another organisation.
    Security group
    A group used to give access to resources, apps and Azure roles.
    Microsoft 365 group
    A group that also gets a shared mailbox, calendar, SharePoint site and Teams team.
    Assigned membership
    Group membership that an owner or admin manages by adding and removing members by hand.
    Dynamic membership
    Group membership calculated from a rule on user or device properties, kept up to date by Entra ID.
    Bulk operations
    Creating, inviting or deleting many users at once from a CSV template in the portal.

    Common mistakes

    • Trying to add someone to a dynamic group manually. Change the property the rule reads instead.
    • Forgetting usage location when you create users who'll need licenses.

    Exam tips

    • "Membership must update automatically when department changes" = Dynamic User group.
    • "Create 500 users from a spreadsheet" = Bulk create with the CSV template.
    • "A group must be able to hold Entra roles" = turn on Microsoft Entra roles can be assigned to the group when you create it (you can't change it later).

    Five quick revision questions

    1. 1.Which license do dynamic groups need?Show

      Microsoft Entra ID P1 (or higher).

    2. 2.What are the three membership types?Show

      Assigned, Dynamic User and Dynamic Device.

    3. 3.What's the rule for everyone in the Sales department?Show

      (user.department -eq "Sales")

    4. 4.Which CLI command creates a user?Show

      az ad user create --display-name ... --user-principal-name ... --password ...

    5. 5.Can you add a user to a dynamic group by hand?Show

      No. Only the rule controls membership.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Licenses and External Users in Microsoft Entra ID

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.