Create a user
In this task you'll create a new user.
Everyone who signs in needs a user account. Users you create here are cloud-only: they exist only in Entra ID. Users that come from an on-premises Active Directory are covered in section 5.
A user's sign-in name looks like an email address, such as name@sskaiser.example. It's called the user principal name.
Example. When SS Kaiser hires a new store manager, the service desk creates priya.shah@sskaiser.example, fills in her job title and department, and adds her to the Store managers group.
Before you start
You need: User Administrator or Global Administrator. Time: 5 minutes.
Where to look
- Home
- Microsoft Entra ID
- Users
- + New user
- Create new user
Steps
- Open Microsoft Entra ID and select Users.
- Select + New user, then Create new user.
- In User principal name, type test.user and pick your domain from the list next to it.On a free account that's the onmicrosoft.com domain. The next tasks in this section use this user.
- Enter a Display name, such as Test User.
- Leave Auto-generate password ticked, and copy the password shown.It's shown only once. The user has to change it the first time they sign in.
- Leave Account enabled ticked. On the Properties tab you can add a job title, a department and a usage location.
- Select Review + create, check the summary, then Create. A message says Successfully created user.The Users list can take a moment to show the new user. Select Refresh if it isn't there yet.
Commands
# Replace <your-domain> with your tenant's domain (from the previous task)
az ad user create --display-name "Test User" \
--user-principal-name test.user@<your-domain> \
--password "<a strong temporary password>" \
--force-change-password-next-sign-in true
# Delete the user again
az ad user delete --id test.user@<your-domain>
Watch out for
- Cost
- Creating users is free. Licences for Microsoft 365 or Entra ID P1 cost money, but you don't need any for this guide.
- Security
- Treat a first password like a key: give it to the person privately, and never send it in the same message as the user name. Delete test users you no longer need.
- Common mistakes
- Using a domain the tenant hasn't verified, which isn't offered in the list. Deleting the wrong user: deleted users stay under Deleted users for 30 days and can be restored.
Clean up
- Users
- Test User
- Delete
Keep this user until you've finished section 4, because the next tasks use it. Then open the user, choose Delete and confirm. It moves to Deleted users, where it can be restored, and is removed for good automatically after 30 days.
Words to know
- User principal name (UPN)
- The name a user signs in with, written like an email address.
- Cloud-only user
- A user created in Entra ID itself, not copied from an on-premises directory.
- Usage location
- The country a user works in. It must be set before most licences can be assigned.
Tick off each step and track your progress in the guide.
Open this task in Azure Portal, Hands On