Bulk create users in Microsoft 365 from a CSV file
At the end you will have created many Microsoft 365 user accounts at once, either through the admin center CSV import (up to 249 users per file) or with a Microsoft Graph PowerShell script.
What you need before step 1
Applies to: Cloud-only user accounts in Microsoft 365 for business and enterprise tenants (as documented). If your users come from on-premises Active Directory, sync them with Microsoft Entra Connect instead.
Admin roles you need
- User Administrator (to create users) and License Administrator or User Administrator (to assign licences) in Microsoft 365. Microsoft advises against using Global Administrator for routine work.
Licences
- Enough unassigned licences for the new users. Microsoft gives you 30 days to license an account after you create it.
Install instructions
https://learn.microsoft.com/graph/powershell/installationOur step-by-step →Install stepsWeb portals you will use (nothing to install)
https://admin.microsoft.comOpenAlso have ready
- The domain users will sign in with (for example contoso.com) added and verified in Microsoft 365.
- A list of users with at least a user name (for example chris@contoso.com) and a display name for each.
- The two-letter ISO 3166-1 country code for each user's usage location (for example AU, GB, US). A licence cannot be assigned without it.
- A plain text editor such as Notepad (Windows) or TextEdit in plain text mode (macOS), or Excel saving as CSV.
8 steps
- 1
Open Add multiple users
Where: Microsoft 365 admin center > Users > Active usersSign in at
https://admin.microsoft.com, go to Users > Active users and select Add multiple users.You should see: The Add list of users page asks whether to add users in rows on the page or upload a CSV. Select I'd like to upload a CSV with user information; links to a blank CSV and an example CSV appear. Older tenants may show this as an Import multiple users panel with the same template links. - 2
Download and fill in the CSV template
Where: Add list of users page, then a text editor or ExcelDownload the blank CSV. Keep row 1 exactly as it is, because Microsoft requires the same column headings in the same order. Add one user per row below it. User Name and Display Name are required; leave other fields blank if you do not have them. The file can have at most 250 rows (249 users). For more users, split them over several files. Microsoft also suggests one file per country or region because the wizard sets one location per file. Save as CSV in UTF-8 or Unicode if you use non-English characters.
User Name,First Name,Last Name,Display Name,Job Title,Department,Office Number,Office Phone,Mobile Phone,Fax,Alternate email address,Address,City,State or Province,ZIP or Postal Code,Country or Region chris@contoso.com,Chris,Green,Chris Green,IT Manager,Information Technology,,,,,,,,,,Australia ben@contoso.com,Ben,Andrews,Ben Andrews,Accountant,Finance,,,,,,,,,,AustraliaYou should see: A CSV with the 16 headings in row 1 and one user on each following row. - 3
Upload and verify the file
Where: Microsoft 365 admin center > Users > Active users > Add multiple usersSelect Browse, go to the CSV, and select Open. If your page shows a Verify button, select it and fix any problems it reports (you can download a log file), then verify again.
You should see: The file is accepted and you can continue to Licenses. - 4
Choose location, licences and apps
Where: Add multiple users > LicensesSelect the usage location, the licences and the apps to assign to every user in the file. One location applies to the whole file. Then continue to Review and finish adding multiple users and select Add users.
You should see: A results page shows how many users were created and whether you need more licences. - 5
Save the results
Where: Add multiple users > results pageSend the results to yourself if you need the temporary passwords. Microsoft warns the passwords are sent in plain text, so send them only to a mailbox you control and delete the email once users have signed in.
You should see: The new users are listed on the Active users page (it can take a few minutes for them to appear). - 6
Alternative: install Microsoft Graph PowerShell
Where: PowerShell 7 on your admin PC (Windows or macOS)Use this route for more than 249 users or if you want to script the import. Install the module for your account, as documented on the Microsoft Graph PowerShell installation page.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Install-Module Microsoft.Graph -Scope CurrentUser -Repository PSGallery -Force Get-InstalledModule Microsoft.GraphYou should see: Get-InstalledModule lists Microsoft.Graph and its version. - 7
Prepare a CSV for PowerShell
Where: A text editor, saved as C:\temp\NewAccounts.csv (or ~/NewAccounts.csv on macOS)For PowerShell, the column names are up to you as long as the script uses the same names. Microsoft's example uses these columns.
UserPrincipalName,FirstName,LastName,DisplayName,UsageLocation,MailNickname chris@contoso.com,Chris,Green,Chris Green,AU,chris ben@contoso.com,Ben,Andrews,Ben Andrews,AU,benYou should see: A CSV with one header row and one row per user. - 8
Connect and create the users
Where: PowerShell 7 on your admin PCConnect with the
User.ReadWrite.Allscope and sign in as a User Administrator in the browser window that opens. Then run the loop. Replace the password with a strong temporary one (Microsoft requires 8 to 16 characters mixing lower case, upper case, numbers and symbols) and require a change at first sign-in.Connect-MgGraph -Scopes "User.ReadWrite.All" $users = Import-Csv -Path "C:\temp\NewAccounts.csv" foreach ($user in $users) { $PasswordProfile = @{ Password = "Temp-Pa55word!"; ForceChangePasswordNextSignIn = $true } New-MgUser -DisplayName $user.DisplayName -GivenName $user.FirstName -Surname $user.LastName -UserPrincipalName $user.UserPrincipalName -UsageLocation $user.UsageLocation -MailNickname $user.MailNickname -PasswordProfile $PasswordProfile -AccountEnabled:$true }You should see: PowerShell prints a line for each new user with its Id, DisplayName and UserPrincipalName.
Expert tips
If staff exist in on-premises Active Directory, sync them with Microsoft Entra Connect instead. Creating cloud accounts first and syncing later relies on soft matching and often ends in duplicate or conflicting accounts. Bulk CSV creation is for cloud-only organisations, such as Google Workspace or IMAP moves.
The admin center wizard applies one usage location and one set of licences to the whole file, and takes at most 249 users. Build one CSV per country (and per licence type) so nobody gets the wrong location. Save as UTF-8 if names contain non-English characters, and keep row 1 exactly as downloaded.
The Graph route reads any columns you define, so put UsageLocation (and anything else, such as Department) in the CSV per user. It also has no 249-user limit. Run it against a two-row test file first, then check those accounts with Get-MgUser before running the full list.
The sample loop uses one fixed password for clarity. In production generate a unique password per row, keep ForceChangePasswordNextSignIn = $true, and hand passwords out through a channel you control. Microsoft warns the admin center result email sends passwords in plain text, so send it only to yourself and delete it afterwards.
Set each User Name to the address the person will receive mail on (for example chris@contoso.com), with the domain already verified. Users then sign in with the address they know, and you avoid renaming accounts after the mail migration. Check User Name stays within the 79-character limit Microsoft lists for the template.
How to confirm it worked
In the Microsoft 365 admin center go to Users > Active users and check the new accounts are listed with the licence you chose.
In PowerShell, check one account and its usage location:
Get-MgUser -UserId chris@contoso.com -Property DisplayName,UserPrincipalName,UsageLocation | Select-Object DisplayName,UserPrincipalName,UsageLocationSign in at
https://www.office.comas one test user with the temporary password and confirm you are asked to set a new one.
How to reverse it
Delete the accounts you created by mistake from Users > Active users, or run Remove-MgUser -UserId chris@contoso.com for each one. Deleted accounts can be restored from Users > Deleted users only for a limited period, so remove licences and check nothing is stored in a mailbox or OneDrive you need before deleting.
Errors you might see
The CSV fails VerifyCause: Column headings were changed, reordered or removed, or a field is longer than allowed (for example User Name over 79 characters).
Fix: Download a fresh template, paste your data under the original headings and check the character limits on the Microsoft page.
More than 250 rowsCause: The admin center import accepts at most 250 rows including the header.
Fix: Split the list into files of 249 users or fewer, or use the PowerShell method.
New users do not show in Active usersCause: Changes take a few minutes to replicate across Microsoft 365.
Fix: Wait a few minutes and refresh the page.
Licence assignment fails for a userCause: The user has no usage location; a licence cannot be assigned without one.
Fix: Set UsageLocation on the user (Update-MgUser -UserId user@contoso.com -UsageLocation AU) and assign the licence again.
Questions
How many users can I import at once in the admin center?
Up to 249 users per file (250 rows including the header). Use several files or PowerShell for more.
Can I assign different licences to different users in one import?
The admin center import assigns one licence to everyone in the file. Use separate files or assign licences afterwards.
Does bulk import create mailboxes?
Microsoft states that at the end of the process each user with an account will have a Microsoft 365 mailbox. That depends on the licence you assign including Exchange Online.
Should I use this if I have on-premises Active Directory?
No. Sync those users with Microsoft Entra Connect so you do not end up with duplicate cloud accounts.
Official sources
Vendors change menus and requirements. Confirm on the source before you rely on a detail. Last checked 4 Nov 2026.