User Management
MS-102 Exam Alignment
MS-102
Manage users and groups (user accounts): create, edit, and delete user accounts; manage sign-in status; perform bulk user operations; understand soft-delete and the 30-day recovery window; revoke active sessions.
- Create user accounts via the Add a user wizard — know the Usage Location requirement
- Block user sign-in and understand that existing sessions persist for up to 1 hour
- Revoke active sessions immediately using Revoke-MgUserSignInSession
- Know the 30-day soft-delete window and how to restore deleted users
- Perform bulk user creation using the CSV template
👤 Active Users — The User List
M365 Admin Center › Users › Active users
| Display name | Username | Licenses | Status |
|---|---|---|---|
| JDJohn Doe | jdoe@contoso.com | Microsoft 365 E3 | Active |
| PKPriya Kumar | pkumar@contoso.com | Microsoft 365 E5 | Active |
| MSMark Stevens | mstevens@contoso.com | — | Blocked |
➕ Creating a New User
The Add a user wizard collects all key fields before the account is created, across four steps:
-
1Basics — First name, last name, display name, username (UPN), and whether to auto-generate or manually set the initial password. Enable "Require this user to change their password when they first sign in" for security.
-
2Product licenses — Select the usage location (country — required for licensing compliance) and assign one or more available product licenses.
-
3Optional settings — Set job title, department, office, manager, and phone numbers. Optionally assign an admin role. All fields are editable later.
-
4Review and finish — Confirm all settings. Option to email the new credentials to a specified address for secure handoff to the user.
⚠️ UPN vs Email Address — Common Interview Topic
The User Principal Name (UPN) is the login username (e.g. jdoe@contoso.com). By default it matches the primary SMTP email address. However, in hybrid environments the UPN might use an on-premises domain (jdoe@contoso.local) while email uses a routable domain (jdoe@contoso.com). This UPN mismatch can cause authentication issues with ADFS or pass-through authentication and is a frequently tested interview topic.
✏️ Editing User Properties
Click any user in the Active users list to open their side panel. Key tabs:
| Tab | What You Can Edit |
|---|---|
| Account | Username (UPN), display name, sign-in status, email aliases, profile information |
| Licenses and apps | Assign or remove product licenses; toggle individual service plans within a license |
| Roles | Assign or remove admin roles for this user |
| Email aliases and mail forwarding settings (requires Exchange license) | |
| OneDrive | Storage usage and admin access to the user's OneDrive files |
| Devices | Devices registered to this user in Microsoft Intune |
🔑 Resetting a Password
M365 Admin Center › Users › Active users › [user] › Reset password
-
1In Active users, click on the user whose password needs resetting
-
2In their properties panel, click Reset password
-
3Choose to auto-generate the password or set a custom one
-
4Enable "Require this user to change their password when they first sign in" — always recommended
-
5Optionally email the temporary credentials to yourself for secure handoff
🚫 Blocking a User's Sign-In
Blocking sign-in prevents the user from authenticating to any Microsoft 365 service, without deleting the account. This is the correct first action when an employee is terminated:
-
1In Active users, click the user and open the Account tab
-
2Under Sign-in status, click Edit → select Block this user from signing in
-
3Save the change — the user is blocked from all new authentications immediately
🚨 Critical — Existing Sessions Stay Active for Up to 1 Hour
Blocking sign-in stops new logins but does not immediately terminate existing sessions. Active access tokens remain valid for up to 1 hour. To force immediate logout of all active sessions, also run: Revoke-MgUserSignInSession -UserId [UPN] via PowerShell, or use the Entra ID portal to revoke sessions.
🗑 Deleting and Restoring Users
💡 Soft Delete — 30-Day Recovery Window
When you delete a user in the M365 Admin Center, the account is soft-deleted — moved to Deleted users where it remains for 30 days. During this window it can be fully restored with all properties, licenses, and group memberships intact. After 30 days the account is permanently deleted and cannot be recovered.
To restore: go to Users → Deleted users, select the account, click Restore user. If the original license was released during deletion, you must reassign it after restoration.
📋 Bulk User Operations
Access bulk operations via the ⋯ (more actions) menu in Active users:
- Add multiple users — Download the CSV template, complete required columns (DisplayName, UserName, Initial Password, etc.), upload the file. M365 validates the CSV before creating any accounts
- Export users to CSV — Download the full user list with all properties for auditing or reporting purposes
- Bulk delete — Upload a CSV of UPNs to delete multiple accounts at once
⚡ PowerShell — User Management
Connect-MgGraph -Scopes "User.ReadWrite.All" # List all users Get-MgUser -All | Select DisplayName, UserPrincipalName, AccountEnabled # Create a new user $PasswordProfile = @{ Password = "Temp@12345"; ForceChangePasswordNextSignIn = $true } New-MgUser -DisplayName "Jane Smith" -UserPrincipalName "jsmith@contoso.com" -AccountEnabled $true -PasswordProfile $PasswordProfile -MailNickname "jsmith" # Block sign-in Update-MgUser -UserId "jdoe@contoso.com" -AccountEnabled $false # Revoke all active sessions immediately Revoke-MgUserSignInSession -UserId "jdoe@contoso.com" # Soft-delete a user (30-day recovery window) Remove-MgUser -UserId "jdoe@contoso.com" # Restore a deleted user Restore-MgDirectoryDeletedItem -DirectoryObjectId "[object-id]"
🎓 Interview Q&A
Revoke-MgUserSignInSession) or the Entra ID portal. Blocking sign-in alone leaves the user's active sessions open for up to 1 hour until tokens expire.Revoke-MgUserSignInSession -UserId [UPN] via PowerShell. This invalidates all refresh tokens — when any M365 app tries to silently renew its access token, it will fail and force the user out.A user account was deleted 10 days ago. The user's manager now needs the account and all its data restored. What should you do?
You have blocked a terminated employee's sign-in. Their manager reports the employee is still accessing Teams on their mobile phone. What is the most likely reason and what should you do?
A new employee needs a Microsoft 365 E3 licence, but when you try to assign it, you receive an error. The licence count shows 50 available E3 seats. What is the most likely cause?
Your organisation is onboarding 300 new employees next week. What is the most efficient method to create all the accounts in Microsoft 365 Admin Center?
An employee is going on a 6-month sabbatical. They should not be able to sign in, but their manager needs continued access to their mailbox and OneDrive. Which action is correct?