AZ-104 Refresher Chapter 1 ยท Microsoft Entra ID

Chapter 1

Microsoft Entra ID: users, groups and access

๐Ÿ“– Theory 30 min๐Ÿ›  Lab 20 minIdentities & governance ยท 20โ€“25%

Everything in Azure starts with an identity. Before you can give someone access to a VNet or a storage account, that person (or app) must exist in Microsoft Entra ID. This chapter covers users, groups, licenses, guests and self-service password reset.

Part A

Theory

Tenants and subscriptions

A tenant is one dedicated instance of Entra ID for one organisation. It has a default domain like contoso.onmicrosoft.com and can have extra custom domains (like contoso.com) after you prove ownership with a DNS TXT or MX record.

The relationship between tenants and subscriptions is a classic exam topic:

Entra ID tenantcontoso.onmicrosoft.com ยท contoso.com Users Membercloud / synced GuestB2B invited UPN ยท usage location ยท department Deleted users: restorable for 30 days Groups Type:Security ยท Microsoft 365 Membership:Assigned Dynamic user (P1) Dynamic device (P1) Owners can manage members Licenses Free ยท P1 ยท P2 ยท M365 E3/E5 โ€ฆ Assign to a user or to a group Needs usage location Directory roles Global Administrator User / Groups Administrator Helpdesk ยท License ยท Guest Inviter Scope: tenant or administrative unit Subscription Atrusts 1 tenant Subscription Btrusts 1 tenant Subscription Ctrusts 1 tenant Azure RBAC roles live here (chapter 2)
One tenant holds the identities; many subscriptions can trust it. Directory roles (tenant) and Azure RBAC roles (subscriptions) are two separate systems.

Entra ID editions

Many exam questions are really asking "which license do you need?" Remember the features that need P1, because they come up most:

FeatureFreeP1P2
Users, groups, basic reports, B2B guestsโœ“โœ“โœ“
Security defaults (basic MFA for everyone)โœ“โœ“โœ“
Dynamic groupsโœ“โœ“
Group-based licensingโœ“โœ“
SSPR for users (and password writeback to on-prem AD)โœ“โœ“
Conditional Accessโœ“โœ“
Identity Protection (risky sign-ins), Privileged Identity Management (PIM), access reviewsโœ“

A handy way to remember: P1 = automation and control (dynamic groups, group licensing, Conditional Access, SSPR). P2 = risk and privileged access (Identity Protection, PIM).

Users

There are two ways to look at a user: where it comes from and what type it is.

Important user properties for the exam:

You can create users in the portal one at a time, with bulk create (download a CSV template, fill it in, upload it), with Microsoft Graph PowerShell (New-MgUser), with the Azure CLI (az ad user create) or through the Graph API. Bulk operations also exist for invite, delete and "download users".

When you delete a user, it goes to Deleted users for 30 days. Within that time you can restore it with all group memberships and licenses intact. After 30 days it is permanently removed.

Exam trap

"You can't change the department of a user in the portal; the field is greyed out." The user is synchronized from on-premises AD. You change it in on-premises AD and let sync update Entra ID.

Administrative units

An administrative unit (AU) is a container for users, groups or devices that lets you scope a directory role to part of the organisation. Example: the Benelux helpdesk gets the Helpdesk Administrator role scoped to the "Benelux" AU, so they can reset passwords only for Benelux users. Without AUs, directory roles apply to the whole tenant.

Directory roles you should know

Directory roles control what you can do in Entra ID itself (users, groups, settings). They are not the same as Azure RBAC roles like Owner or Contributor, which control Azure resources. Use the least privileged role that does the job:

RoleCan do
Global AdministratorEverything. Keep this to 2โ€“4 people (plus break-glass accounts).
User AdministratorCreate and manage users and groups, reset passwords of non-admins, manage some admin passwords.
Groups AdministratorCreate and manage groups and group settings.
Helpdesk AdministratorReset passwords and invalidate refresh tokens for non-admins and other Helpdesk admins.
License AdministratorAssign and remove licenses, edit usage location.
Guest InviterInvite guests when "members can invite" is turned off.

Groups

Groups make administration scale: you give access, licenses or apps to a group once, and people inherit it by being a member. Groups have two settings that matter most.

Group type

Membership type

A group's membership type can be changed later (assigned โ†” dynamic), but a group can't hold users and devices in one dynamic rule. Dynamic rules re-evaluate automatically when user properties change, which can take some minutes.

Exam trap

"You need to add a device to a Microsoft 365 group." That's impossible: M365 groups hold users only. Use a security group. Also: nested groups don't inherit group-based licenses. Only direct members of the licensed group get the license.

Other group settings worth recognising: group owners can manage membership without an admin role; "Microsoft Entra roles can be assigned to the group" must be set at creation time and can't be changed later; and group expiration and naming policies apply to Microsoft 365 groups.

Licenses

Licenses (Entra ID P1/P2, Microsoft 365 E3/E5 and so on) are bought per tenant and then assigned to users. There are two ways:

When group licensing fails for a user, the group shows an error state. The usual reasons are:

External users (B2B)

B2B collaboration lets people from other organisations use their own identity (their work account, a Microsoft account, Google, or a one-time email passcode) to access your apps and resources. In your tenant they appear as a guest user object.

The invitation flow works like this:

  1. An admin or allowed user invites the external email address (portal, bulk CSV, PowerShell or Graph).
  2. Entra ID creates a guest user object with userType = Guest and sends an invitation email.
  3. The person redeems the invitation by signing in with their own account and accepting the consent prompt. The guest object's state changes from Pending acceptance to Accepted.
  4. You can now add the guest to groups, apps and Azure RBAC roles like any other user.

You control B2B in External Identities โ†’ External collaboration settings:

A separate area, cross-tenant access settings, controls trust with specific other Entra tenants: whether you trust their MFA and device compliance claims, and which users and apps may collaborate inbound or outbound.

Not the same thing

B2B collaboration is for partners working with your organisation. Microsoft Entra External ID for customers (formerly Azure AD B2C) is for consumer sign-up and sign-in to your public apps, in a separate external tenant. If a question mentions millions of customers signing up with social accounts, that's External ID, not B2B guests.

Self-service password reset (SSPR)

SSPR lets users reset their own forgotten password, which saves the helpdesk a lot of calls. You configure it under Protection โ†’ Password reset. The settings, in the order the portal shows them:

Two behaviours surprise people:

Exam trap

"Enable SSPR for the Sales and Marketing groups." SSPR Selected accepts only one group. Create a third group with Sales and Marketing as nested members, or enable it for All.

AZ-305 link

In AZ-305 you design identity, so expect questions like "which license is the minimum that meets the requirement", "B2B or External ID", "Entra Connect vs Cloud Sync" and "how do you give admins just-in-time access" (PIM, P2). Knowing the P1/P2 split from this chapter answers half of them.

Self-check

1. Group-based licensing fails for one user. The license is available and other members got it. What is the most likely cause?

C. Licenses can't be assigned without a usage location. Dynamic groups and M365 groups both support group licensing.

2. You want all users whose department is "IT" to be added to a group automatically, including new hires. What do you need?

B. Dynamic membership needs P1. Administrative units scope admin roles; they don't grant access.

3. A helpdesk team in Belgium must reset passwords only for Belgian users. What is the least-privilege solution?

D. Administrative units scope directory roles. Azure RBAC roles (Owner) don't control Entra users.

4. You move a subscription to a different Entra tenant. What happens to the existing role assignments?

A. The old identities don't exist in the new tenant, so all RBAC assignments are removed and must be recreated.

5. SSPR is set to None. Can a Global Administrator reset their own password with SSPR?

C. The admin SSPR policy is always on and requires two strong methods.

Part B

Lab: users, groups, a guest and SSPR

You create two users and two groups. The group az104-admins is the one you give Azure permissions to in chapter 2, so keep it.

Lab tenant only

Steps 5 and 6 change tenant-wide settings. Do them in your own lab tenant, not your employer's.

  1. Task

    Find out which Entra ID edition you have

    Find your tenant's license edition. Steps 4 and 6 need P1. If you have Free, start a free 30-day Entra ID P2 trial (P2 includes P1), or skip those steps.

    Done when
    • You know whether you have Free, P1 or P2.
    Solution ยท Portal

    Microsoft Entra admin center โ†’ Overview: the License field. For a trial: Billing โ†’ Licenses โ†’ All products โ†’ Try / Buy (or the Microsoft 365 admin center โ†’ Billing โ†’ Purchase services).

  2. Task

    Create two users

    Create these cloud users. Use a password you'll remember for Ada; you need it for the SSPR test.

    UPNDisplay nameDepartmentUsage location
    az104-ada@<your domain>Ada (AZ-104)ITyour country
    az104-ben@<your domain>Ben (AZ-104)Financeyour country
    Done when
    • Both users show in All users with the right department and usage location.
    Solution ยท Portal
    1. Users โ†’ All users โ†’ New user โ†’ Create new user.
    2. Basics: UPN and display name; choose or auto-generate a password.
    3. Properties: set Department and Usage location.
    4. Review + create. Repeat for Ben.
    Solution ยท Azure CLI
    DOMAIN=$(az rest --url https://graph.microsoft.com/v1.0/domains --query "value[?isDefault].id" -o tsv)
    az ad user create --display-name "Ada (AZ-104)" --user-principal-name az104-ada@$DOMAIN --password '<choose-a-strong-password>'
    az ad user create --display-name "Ben (AZ-104)" --user-principal-name az104-ben@$DOMAIN --password '<choose-a-strong-password>'
    
    # az ad user create has no department flag, so set it through Microsoft Graph
    az rest --method PATCH --url "https://graph.microsoft.com/v1.0/users/az104-ada@$DOMAIN" \
      --body '{"department":"IT","usageLocation":"NL"}'
    az rest --method PATCH --url "https://graph.microsoft.com/v1.0/users/az104-ben@$DOMAIN" \
      --body '{"department":"Finance","usageLocation":"NL"}'
  3. Task

    Create the group az104-admins

    Create a security group with assigned membership called az104-admins. You are the owner and Ada is a member. Chapter 2 gives this group Azure permissions.

    Done when
    • The group's Members shows Ada and Owners shows you.
    Solution ยท Portal

    Groups โ†’ All groups โ†’ New group: Group type Security, name az104-admins, Membership type Assigned. Under Owners add yourself, under Members add Ada. Create.

    Solution ยท Azure CLI
    az ad group create --display-name az104-admins --mail-nickname az104-admins
    az ad group member add --group az104-admins --member-id $(az ad user show --id az104-ada@$DOMAIN --query id -o tsv)
    az ad group owner add  --group az104-admins --owner-object-id $(az ad signed-in-user show --query id -o tsv)
  4. Task ยท needs P1

    Create a group that fills itself

    Create a security group az104-dept-it that automatically contains every user whose department is IT, including future hires. Before saving, test your rule against Ada and Ben.

    Optional: assign your trial license to this group, then remove Ada's usage location and see what the group reports.

    Done when
    • After a few minutes Ada is a member, Ben isn't.
    • You notice you can't add members by hand. Why not?
    Hint

    Membership type Dynamic User. The rule uses the property user.department.

    Solution ยท Portal
    1. Groups โ†’ New group: type Security, name az104-dept-it, Membership type Dynamic User.
    2. Add dynamic query: property department, operator Equals, value IT. Rule text: (user.department -eq "IT").
    3. Tab Validate rules: add Ada and Ben and check the result. Save โ†’ Create.
    4. Optional: Billing โ†’ Licenses โ†’ All products โ†’ your license โ†’ Assign โ†’ group az104-dept-it.
    Solution ยท Azure CLI (through Graph)
    az rest --method POST --url https://graph.microsoft.com/v1.0/groups --body '{
      "displayName": "az104-dept-it", "mailNickname": "az104-dept-it",
      "mailEnabled": false, "securityEnabled": true,
      "groupTypes": ["DynamicMembership"],
      "membershipRule": "(user.department -eq \"IT\")",
      "membershipRuleProcessingState": "On" }'
  5. Task

    Invite a guest

    First find out who is allowed to invite guests in your tenant and whether there is a domain allow/deny list (just look, don't change). Then invite another email address of your own (a personal Outlook or Gmail) as a B2B guest and redeem the invitation.

    Done when
    • The guest shows User type: Guest and Invitation state: Accepted.
    Solution ยท Portal
    1. External Identities โ†’ External collaboration settings: read Guest invite settings and Collaboration restrictions.
    2. Users โ†’ New user โ†’ Invite external user: enter the email, Review + invite.
    3. Open the mail, click Accept invitation, sign in and accept the consent prompt.
    Solution ยท Azure CLI (through Graph)
    az rest --method POST --url https://graph.microsoft.com/v1.0/invitations --body '{
      "invitedUserEmailAddress": "<your-other-email>",
      "inviteRedirectUrl": "https://myapps.microsoft.com",
      "sendInvitationMessage": true }'
  6. Task ยท needs P1

    Turn on self-service password reset for a pilot group

    Enable SSPR only for members of az104-admins. Users need one method, either email or the Authenticator app notification, and must register when they sign in.

    Test it (optional, 5 min): sign in as Ada in a private window, register methods, sign out, then reset her password yourself.

    Done when
    • The Password reset Properties show Selected โ†’ az104-admins.
    • (Optional) Ada reset her own password.
    Solution ยท Portal
    1. Protection โ†’ Password reset โ†’ Properties: Selected, group az104-admins. Save.
    2. Authentication methods: number required 1; tick Email and Mobile app notification. Save.
    3. Registration: require users to register when signing in = Yes. Save.
    4. Test: private window โ†’ https://myaccount.microsoft.com as Ada (MFA registration is also asked) โ†’ sign out โ†’ https://aka.ms/sspr.
Checkpoint

You now have:

  • Users Ada (IT) and Ben (Finance), plus one guest.
  • Group az104-admins (assigned, Ada is a member), which chapter 2 uses for RBAC.
  • Group az104-dept-it (dynamic) and SSPR enabled for az104-admins.

Entra objects cost nothing. You delete them in the chapter 10 cleanup.