Microsoft Entra ID Basics: Tenant, Users, Groups

Microsoft Entra ID is where Azure works out who you are, and every portal sign-in, CLI command and Microsoft 365 login starts there. It used to be called Azure Active Directory (Azure AD), a name you’ll still come across in older scripts and blog posts.

You’ll look inside the tenant that came with your free account, find its domain name and see how your own account looks from the inside. Then you’ll create two users and a group, the way a helpdesk does on a new joiner’s first day.

Hang on to these users, because in the next few lessons they get Azure roles and a Conditional Access policy.

TimeYou needCostBy the end you can
About 40 minutesThe Azure CLI from Lesson 3, signed in as the account ownerNothing (Entra ID Free is included)Find your tenant and domain, create users and groups, and explain directory roles vs Azure roles

What it is, in one line

Microsoft Entra ID is the company’s address book and security desk in the cloud, holding the users and groups and checking who they are when they sign in.

In Simple Words

The school office and its register

Every school has an office with a register listing each student’s name, class and roll number, and when a student wants to borrow a library book, the librarian checks that register first.

Entra ID is that office for a company. The tenant is the whole school’s register and a user is one student, while a group is a class, so the teacher can give the whole class permission at once without naming every child.

The office only tells people who you are. What you’re allowed to borrow is up to each library, and in Azure that’s the topic of the next lesson.

Engineer's View

Tenants, objects and two kinds of roles

  • Tenant: one dedicated instance of Entra ID, with its own tenant ID (a GUID) and at least one domain, like priyakoutlook.onmicrosoft.com. Companies add their own verified domain, such as contoso.com, so users can sign in with names they recognise.
  • Users: members are people in your organisation, and guests are people from outside, invited with B2B. Each one has an object ID that never changes and a user principal name (UPN) that can.
  • Groups: security groups are for access, and Microsoft 365 groups come with a shared mailbox, Teams and files. Membership is either assigned (you add people yourself) or dynamic (a rule like department equals “IT”), and dynamic groups need Entra ID P1.
  • Directory roles like Global Administrator, User Administrator and Helpdesk Administrator control Entra ID itself, meaning users, groups and settings, while Azure roles (RBAC) like Owner and Contributor control Azure resources. The two systems are separate, so a Global Administrator can’t touch a VM until they elevate or are given an Azure role.

Entra ID Free comes with every Azure subscription. It covers users, groups and basic MFA through security defaults, which are switched on in new tenants. P1 adds Conditional Access and dynamic groups, and P2 adds Identity Protection and Privileged Identity Management (PIM).

If you signed up with a personal Microsoft account, you’re an external identity in your own tenant, and your UPN looks like priya.k_outlook.com#EXT#@priyakoutlook.onmicrosoft.com. That’s your email with the @ changed to _, followed by #EXT# and the tenant’s domain. Users you create inside the tenant get normal UPNs.

How it works, step by step

This is what happens when someone signs in to Azure with an Entra ID account:

Microsoft Entra ID sign-in flow: UPN, password, MFA, token and app
  1. The user types their UPN, and Entra ID looks up which tenant owns that domain.
  2. Entra ID checks the password and then MFA (security defaults or Conditional Access decide when MFA is needed).
  3. Entra ID issues a token saying who the user is, which tenant they belong to and, for some apps, which groups they’re in.
  4. The app, say Azure Resource Manager, reads the token and decides what the user is allowed to do, and for Azure that decision is RBAC.

So Entra ID answers “who are you?” and each service answers “what may you do?”. Most “I can’t get in” tickets come down to one or the other, and working out which one first saves a lot of time.

Microsoft Entra ID directory roles compared with Azure RBAC roles and groups

What keeps all of this manageable is giving access to groups instead of single people. When someone joins the helpdesk you add them to the helpdesk group and they get everything in one go, and when they leave you remove them in one place.

Hands-on lab: build a small helpdesk team

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

You’ll read your tenant’s details and then create a small helpdesk team of two users and one security group. It’s all free and stays in your tenant for the lessons that follow.

1Find your tenant’s domain

Run this:

az rest --method get --url "https://graph.microsoft.com/v1.0/domains" --query "value[].{name:id, isDefault:isDefault, verified:isVerified}" -o table

You should see something like this:

Name                           IsDefault    Verified
-----------------------------  -----------  ----------
priyakoutlook.onmicrosoft.com  True         True

az rest can call Microsoft Graph as well as Azure Resource Manager, and Graph is the API behind Entra ID and Microsoft 365. Save the domain for the next steps:

$domain = az rest --method get --url "https://graph.microsoft.com/v1.0/domains" --query "value[?isDefault].id" -o tsv
$domain

You should see something like this:

priyakoutlook.onmicrosoft.com

2See your own account from the inside

Run this:

az ad signed-in-user show --query "{name:displayName, upn:userPrincipalName}" -o table

You should see something like this:

Name     Upn
-------  ------------------------------------------------------
Priya K  priya.k_outlook.com#EXT#@priyakoutlook.onmicrosoft.com

If you signed up with a personal Microsoft account you’ll see #EXT# like this, and if you signed up another way you might see a normal UPN. Either is fine.

3Create two users

Every user needs a starting password. Rather than typing one, let PowerShell generate a long random one, and the user has to change it at first sign-in.

Paste this whole block:

$users = @(
    @{ name = 'Asha Rao';   upn = "asha.rao@$domain" },
    @{ name = 'Ravi Menon'; upn = "ravi.menon@$domain" }
)
foreach ($u in $users) {
    $pw = 'Lab-' + [guid]::NewGuid().ToString('N').Substring(0, 12) + '!'
    az ad user create --display-name $u.name --user-principal-name $u.upn --password $pw --force-change-password-next-sign-in true -o none
    "{0}  {1}" -f $u.upn, $pw
}

You should see something like this (your passwords will be different):

asha.rao@priyakoutlook.onmicrosoft.com  Lab-3f9c0a61b7d2!
ravi.menon@priyakoutlook.onmicrosoft.com  Lab-a08e5c71f4b9!

Copy both lines into a password manager straight away, because you’ll sign in as Asha in Lesson 7 and Lesson 9. If you lose them, you can set a new one later with az ad user update --id <upn> --password <new>.

4Create a security group and add the users

Run this:

az ad group create --display-name grp-saat-helpdesk --mail-nickname grp-saat-helpdesk --description "Course lab: helpdesk team" -o none
$asha = az ad user show --id "asha.rao@$domain" --query id -o tsv
$ravi = az ad user show --id "ravi.menon@$domain" --query id -o tsv
az ad group member add --group grp-saat-helpdesk --member-id $asha
az ad group member add --group grp-saat-helpdesk --member-id $ravi
az ad group member list --group grp-saat-helpdesk --query "[].{name:displayName, upn:userPrincipalName}" -o table

You should see something like this:

Name        Upn
----------  ----------------------------------------
Asha Rao    asha.rao@priyakoutlook.onmicrosoft.com
Ravi Menon  ravi.menon@priyakoutlook.onmicrosoft.com

--member-id needs the user’s object ID and won’t take their UPN, which is why you looked the IDs up first. Object IDs never change, even when the person’s name or UPN does.

Microsoft Entra ID lab: domain, external account UPN and helpdesk group members
Example output. Your domain and names will differ.

5Check a membership the way an app would

Run this:

az ad group member check --group grp-saat-helpdesk --member-id $asha

You should see this:

{
  "value": true
}

6Sign in once as Asha

Open a private (InPrivate or Incognito) browser window, go to portal.azure.com and sign in as asha.rao@ with her starting password. Entra ID asks for a new password, and since security defaults are on, it also asks Asha to set up Microsoft Authenticator.

Do both.

Asha can now get into the portal, but she sees no subscriptions and no resources, because she has an identity and no Azure role yet. That’s the split from the “How it works” section, and you’ll sort it out in Lesson 7.

Close the private window.

✅ Checkpoint: grp-saat-helpdesk has two members, Asha has signed in once with MFA and both passwords are stored somewhere safe.

There’s nothing to clean up, since Entra ID users and groups are free and you’ll need them again. C:\azure-lab\Find-LabResources.ps1 still shows nothing, because Entra objects aren’t Azure resources.

Break It, Then Fix It

Every helpdesk runs into these two errors when creating users, and both make sense once you know what Entra ID is checking.

1Break it: a UPN with a domain you don’t own

Run this:

az ad user create --display-name "Test User" --user-principal-name "test.user@saatvedha.com" --password ('Lab-' + [guid]::NewGuid().ToString('N').Substring(0, 12) + '!')

You’ll get an error like this:

ERROR: The domain portion of the userPrincipalName property is invalid. You must use one of the verified domain names in your organization.

A UPN has to end in a domain that’s verified in this tenant. At work you’d get the same error if someone added a user with the company email domain before that domain was verified in Entra ID, or made a typo in the domain.

To fix it, use the tenant’s own domain:

az ad user create --display-name "Test User" --user-principal-name "test.user@$domain" --password ('Lab-' + [guid]::NewGuid().ToString('N').Substring(0, 12) + '!') --query userPrincipalName -o tsv

You should see something like this:

test.user@priyakoutlook.onmicrosoft.com

2Break it: a short, simple password

Run this:

az ad user update --id "test.user@$domain" --password "asha123"

You’ll get an error like this:

ERROR: The specified password does not comply with password complexity requirements. Please provide a different password.

Entra ID wants at least 8 characters, using three of these four: uppercase, lowercase, numbers and symbols, and asha123 only has two. That’s a good thing, because helpdesks that set passwords to “something easy” are how accounts get taken over.

The real fix is not to make up passwords at all. Delete the test user, since you don’t need it any more:

az ad user delete --id "test.user@$domain"
az ad user list --query "[?contains(userPrincipalName,'test.user')].userPrincipalName" -o tsv

The second command shouldn’t print anything.

Microsoft Entra ID errors: unverified UPN domain and weak password
Example output of both mistakes.

✅ Checkpoint: You’ve reproduced both errors and deleted the test user, and Asha and Ravi are still in grp-saat-helpdesk.

This happened at work

The admin account nobody remembered

A manufacturing company synced its office staff from on-premises Active Directory to Entra ID, and its leaver process worked well: HR closed the AD account and the cloud account was disabled within the hour.

Two years earlier, though, a contractor had been given a separate cloud-only account, admin.vendor@contoso.onmicrosoft.com, with the User Administrator role, to set up a new app. Because it wasn’t in Active Directory, the leaver process never knew about it. A password spray attack found it, the password was weak, and it had no MFA because someone had excluded it “temporarily”.

The attacker had reset the passwords on a dozen accounts by the time the security team spotted odd sign-ins from abroad.

What they changed: no cloud-only account can exist without an owner and an expiry date. A monthly report lists every account holding a directory role, and each owner has to confirm it. Every admin role now needs MFA through Conditional Access, with no exclusions apart from two monitored emergency accounts.

Common mistakes and troubleshooting

MistakeWhat you seeWhat to do
Confusing directory roles with Azure rolesGlobal Admin “can’t see” a VMDirectory roles manage Entra ID. For resources, give an Azure role (Lesson 7).
Using a UPN as --member-idAn error about the object IDLook up the object ID with az ad user show --query id.
Creating a group that already existsaz returns the old group, no errorCheck first, and only pass --force if you do want a second group.
Giving access to single usersAccess sprawl nobody can reviewGive access to groups, and add or remove people from the groups.
Typing passwords by handWeak or reused passwordsGenerate them, force a change at first sign-in and keep them in a password manager.
Cloud-only accounts with no ownerOld admin accounts that never get removedGive every account an owner and an expiry, and review directory roles every month.

Interview questions

Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way to answer in your own words.

Fresher level

1. What is Microsoft Entra ID, in simple words?

Why they ask this: They want a clear basic definition and to hear that you know the new name.

How you might answer: It’s Microsoft’s cloud identity service, which used to be called Azure Active Directory. It holds users, groups and apps, checks who someone is when they sign in and hands them a token that Azure and Microsoft 365 trust.

2. What’s the difference between a member user and a guest user?

Why they ask this: It’s a common basic question about B2B.

How you might answer: A member belongs to our organisation and normally has a UPN in our domain. A guest comes from outside, invited with B2B, signs in with their own company or personal account and only gets the access we give them.

3. Why do we give access to groups instead of single users?

Why they ask this: They want to see good access management habits.

How you might answer: People join, move and leave all the time, so if access sits on a group I change one membership and everything follows. Reviewing who has access is also far easier with a few groups than with hundreds of individual assignments.

2–5 years experience

4. A Global Administrator says they can’t see any VMs in the portal. How is that possible?

Why they ask this: They’re checking that you know Entra directory roles and Azure RBAC are separate.

How you might answer: Global Administrator is a directory role for Entra ID and doesn’t give any access to Azure resources on its own. They need an Azure role like Reader on the subscription, or they can use “Access management for Azure resources” to elevate, which gives them User Access Administrator at the root scope so they can grant themselves a role.

For everyday work I’d rather give a proper role assignment than rely on elevation.

5. How would you create fifty new users for a new office quickly and safely?

Why they ask this: They want scripting skills along with safe password handling.

How you might answer: I’d get a CSV from HR and loop over it with the Azure CLI or Microsoft Graph PowerShell, generating a random starting password for each user and forcing a change at first sign-in, and the same script would add them to the right groups.

If the company has on-premises AD, though, the better answer is often to create them there and let Entra Connect sync them.

6. What does “security defaults” do, and when would you turn it off?

Why they ask this: They want to know you understand baseline MFA and how it moves on to Conditional Access.

How you might answer: Security defaults make everyone register for MFA, require MFA for admins and in risky situations, and block legacy authentication. They cost nothing and are on by default in new tenants.

I’d only switch them off when I’m replacing them with Conditional Access policies that do at least as much, and that needs Entra ID P1.

Senior level

7. You find thirty cloud-only accounts with admin roles and no clear owner. What do you do?

Why they ask this: They want a careful clean-up plan that doesn’t cause an outage.

How you might answer: I’d start by exporting them from the audit and sign-in logs with their roles, last sign-in time and who created them. Accounts that haven’t been used for 90 days I’d disable rather than delete, and announce it, and the rest would get an owner who has to confirm they’re still needed.

Then I’d make sure it doesn’t happen again, with roles given only through PIM with approval and expiry, and an access review every quarter.

8. How would you design admin accounts for a team of five Azure admins?

Why they ask this: They’re checking that you keep daily and privileged identities apart.

How you might answer: Every admin gets a separate admin account with no mailbox, used only for admin work and protected with phishing-resistant MFA. Their roles are eligible through PIM instead of permanent, so they activate them for a few hours and give a reason.

Two emergency accounts sit outside the normal policies, use FIDO2 keys and raise an alert on every sign-in.

9. A user’s UPN changed after marriage, and an app stopped recognising her. Why, and how do you prevent it?

Why they ask this: They want to see you know a UPN can change but an object ID can’t.

How you might answer: The app most likely used her UPN or email as the key, so once the UPN changed she looked like a new person. Apps should store the object ID, because that never changes.

In the short term I’d update the mapping in the app, and I’d raise the design problem with the app owner.

Quick quiz

Q1. What was Microsoft Entra ID called before?

  1. Active Directory Domain Services
  2. Azure Active Directory
  3. Azure AD B2C
  4. Microsoft Account
Show answer

B — Azure AD was renamed Microsoft Entra ID.

Q2. A Global Administrator can’t see VMs. Why?

  1. Their MFA failed
  2. Directory roles don’t give access to Azure resources
  3. VMs are hidden from admins
  4. The tenant is full
Show answer

B — Azure resources need an Azure (RBAC) role.

Q3. What does az ad group member add need for --member-id?

  1. The UPN
  2. The display name
  3. The object ID
  4. The email address
Show answer

C — It needs the object ID, which never changes.

Q4. Why did test.user@saatvedha.com fail?

  1. The password was weak
  2. The domain isn’t verified in this tenant
  3. Users can’t have dots
  4. The CLI was too old
Show answer

B — A UPN must use a verified domain of the tenant.

Q5. Which feature needs Entra ID P1?

  1. Creating users
  2. Security groups
  3. Dynamic groups
  4. Security defaults
Show answer

C — Dynamic membership rules need P1. The others are in Entra ID Free.

Quick recap

You now know where identity lives in Azure, and you’ve got a small helpdesk team to use over the next few lessons.

  • Entra ID (formerly Azure AD) answers “who are you?”, and each service then decides what you’re allowed to do.
  • A tenant has users, groups and at least one domain like name.onmicrosoft.com.
  • Directory roles manage Entra ID and Azure roles (RBAC) manage resources, and the two are separate.
  • Give access to groups, use object IDs in scripts and never make up passwords by hand.
  • Asha, Ravi and grp-saat-helpdesk stay in your tenant for Lessons 7 to 9.

Next lesson

Lesson 6: The Azure hierarchy: management groups to resource groups → You’ll build the layers above your resources (management groups, subscriptions and resource groups) and see how settings flow down through them.

Further reading: Microsoft Entra ID

If you want to go further with Microsoft Entra ID, start with Microsoft’s What is Microsoft Entra ID?, and compare the two kinds of roles in Azure roles, Microsoft Entra roles, and classic subscription administrator roles. The full plan for this course is on the Azure Cloud Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.