Create user accounts in Microsoft 365
Depending on an organization's needs, it can use the following methods to provision user accounts:
- Microsoft 365 admin center. This portal provides a simple web interface for individually creating and managing users, their licenses, and permissions. It's also available as an app for mobile devices or tables as Microsoft 365 admin app.
- Import multiple users. This option provides a method for the bulk importation of multiple users into the Microsoft 365 admin center through a comma-separated value (CSV) file.
- Windows PowerShell. You can use this cmdlet-based and script-based interface to create and manage single and multiple users. You should note that Microsoft scheduled the Azure AD, Azure AD Preview, and MSOnline PowerShell modules for deprecation. Microsoft Graph PowerShell is the PowerShell module to use for interacting with Microsoft Entra ID, Microsoft 365, and other Microsoft services.
- Directory synchronization. This option requires an organization to provision and manage users by synchronizing Microsoft 365 with an on-premises directory service such as Active Directory. Organizations can use either the Microsoft Entra Connect Sync or Microsoft Entra Cloud Sync tool to synchronize on-premises Active Directory objects with Microsoft Entra ID. Microsoft Entra Cloud Sync doesn't support Exchange hybrid deployments.
The most common and easiest way to create user accounts in nondirectory synchronized environments is to use the Microsoft 365 admin center or the Microsoft 365 admin app. Organizations normally use more advanced methods for mass-imports, such as importing multiple users, using Windows PowerShell, or running an automated script for user creation. In organizations that implement directory synchronization, they can't use the Microsoft 365 admin center or Windows PowerShell for user creation. They must instead use the local tools available in their on-premises Active Directory.
Creating users with the Microsoft 365 admin center
Using the Microsoft 365 admin center is the simplest method for creating one or more user accounts. To create a user, following these steps:
- Sign in to Microsoft 365 admin center.
- On the Microsoft 365 admin center, in the left-hand navigation pane, select the Users group and then select Active users.
- On the Active users page, select Add a user. This action starts a wizard that walks you through the steps necessary to add the user information.
- On the Set up the basics page, enter the required user and password information. Verify you select the correct domain for the Username.
- On the Assign product licenses page, select the product license(s) that you want to assign to the user.
- On the Optional settings page, select the role(s) you want to assign to this user.
- On the Review and finish page, review the information you entered. If necessary, correct any information that you entered incorrectly. When all information is correct, select the Finish adding button to add the user account.
Creating users with the Import multiple users option
Organizations can use the Add multiple users option in the Microsoft 365 admin center to add large numbers of users in one operation. Bulk importing of users in this manner requires the use of a comma-separated values (CSV) file. Microsoft 365 provides an empty template and a sample CSV file to make the process easier. Administrators can use a text-editing tool such as Notepad or Microsoft Excel to edit these files. To create users by using bulk import, you should complete the following steps:
- In the Microsoft 365 admin center, on the Active users page, select Add multiple users.
- Browse to the CSV file that contains your users.
- The verification result informs you if any errors are in your file. If there are errors, you can view the results in the linked log file.
- On the Set user options page, set the new users’ sign-in status, location, and licenses.
- On the View your results page, specify who should receive the email of the results. Microsoft recommends that you include your own email address so that you can provide the temporary passwords to your new users.
Creating users with Windows PowerShell
Some Microsoft 365 Administrators prefer to use Windows PowerShell rather than the Microsoft 365 admin center to complete user administrative functions. You must begin by installing Microsoft Graph PowerShell, importing the Microsoft.Graph.Identity.DirectoryManagement module, and connecting to MgGraph with the proper permissions. The following example provides the Read/Write permissions needed to add a new user.
Install-Module Microsoft.Graph -Scope CurrentUser
Import-Module Microsoft.Graph.Identity.DirectoryManagement
Connect-MgGraph -Scopes 'User.ReadWrite.All'
At this point, you're ready to use the New-MgUser cmdlet to create a user account in Microsoft 365. When creating a new user account with the Microsoft Graph PowerShell module, you must specify, at a minimum, the required properties for the user, which includes the user password. The password must satisfy minimum requirements as specified by the user’s PasswordPolicies property. By default, the system requires a strong password. You can optionally specify any other writable properties. For example, to create a new user account, you would run the following commands. The first command assigns the user's password to a variable. The New-MgUser command then references the variable.
$PasswordProfile = @{ Password = 'user password' }
New-MgUser -UserPrincipalName username@domainname –DisplayName 'Firstname Lastname' –GivenName 'Firstname' –Surname 'Lastname' -PasswordProfile $PasswordProfile -AccountEnabled -MailNickName 'email alias'
For example, the following commands create a user account for Allan Deyoung:
$PasswordProfile = @{ Password = 'User.pw1' }
New-MgUser –UserPrincipalName AllanD@Adatum.onmicrosoft.com –DisplayName 'Allan Deyoung' – GivenName 'Allan' –Surname 'Deyoung' -PasswordProfile $PasswordProfile -AccountEnabled -MailNickName 'AllanD'
Exercise – Interactive demonstration
Select the following link to complete an interactive demonstration titled: Create a user account for Adatum's Microsoft 365 Administrator.
This simulation guides you through the steps to create a Microsoft 365 user account and assign it the Global Administrator role. This demonstration centers around the fictitious Adatum Corporation. You create a user account for the equally fictitious Holly Dickson, who is Adatum's new Microsoft 365 Administrator. You then assign Holly the Microsoft 365 Global Administrator role.
Knowledge check
Choose the best response for the following question.