How to create or import mailboxes to Microsoft 365

How to create mailboxes in Microsoft 365 with PowerShell or admin center OG

Required permissions

The permissions needed to create mailboxes are Mail Recipients and Mail Recipient Creation. The two default groups with the required permissions are Organization Management and Recipient Management.

Migrating to Microsoft 365?

The most common scenario when you need to create mailboxes in Microsoft 365 is when you recreate your on-premises Exchange environment. In this article, I only show how to create mailboxes. Keep in mind, however, that migration requires you also to move their contents. Click the links below to learn how to perform the migration process for different scenarios:

And if you want to make the process much easier, there is a migration tool which gets the job done. It allows you to:

  • create and assign licenses automatically,
  • schedule your migration and get automatic reports and notifications,
  • easily migrate user mailboxes and public folders from Exchange Server (2010+) and SBS 2011,
  • make sure nothing gets lost in the process with the post migration rescan feature
  • and more…

Create a user mailbox in the Microsoft 365 admin center

Currently, the only place in the admin portal that lets you create user mailboxes is the Active users tab in the Microsoft 365 admin center. Shared mailboxes can be created from Teams & groups > Shared mailboxes or, in the Exchange admin center, from Recipients > Mailboxes.

To create a new user with a mailbox, click Add a user in the Active users settings page:

Add a new user from Microsoft 365 admin center

Next, fill out basic information about the user. The only required fields are Display name, Username (UPN) and password. While you can skip all other fields whatsoever, it’s usually best to fill out all you can now. It lessens the risk of having incomplete Entra ID (Azure AD) later on.

New M365 user mailbox - Set up the basics

In the next step, select the user’s location and assign product licenses from the available pool. If you want the user to have an active mailbox, you need to assign a plan which includes the Exchange Online service. Otherwise, you will create the user without a mailbox.

New user mailbox - assign product licenses

The last step is about filling out more detailed profile description. Once again, you can leave it for later, but it’s not recommended.

New M365 user mailbox - more profile info

After that, the mailbox is created.

To create multiple users, you can use the Add multiple users button on the Active users settings page.

M365 admin center active users - add users

Here, you can download sample CSV files with the required headers. In most cases, however, you’d already have your user information stored somewhere, so you could either copy users’ info to the file with the right headers or use PowerShell to create a CSV file with the right headers and your users’ data already filled out. Learn how to export users from Active Directory

Once you have the CSV file, use the Browse button to locate it and start the mailbox creation process.

New user mailboxes - upload CSV

Next, you can assign licenses just like you would while creating a single mailbox:

New user mailboxes - assign licenses

Create a shared mailbox from the Microsoft 365 admin center

To create a shared mailbox, go to Microsoft 365 admin center > Teams & groups > Shared mailboxes, or use this link. Then, click Add a shared mailbox.

Create shared mailbox from M365 admin center

On the right, you should see a new pane with 3 fields to be filled out with relevant information.

Add a shared mailbox pane

After the mailbox is created, you can select it from the list, click Edit, and add members:

Add members to a shared mailbox

Create user mailboxes with PowerShell

Before you do anything with PowerShell in your Microsoft 365 tenant, you need to connect to Exchange Online. Learn how to connect to Exchange Online with PowerShell

Using the New-Mailbox cmdlet from the Exchange Online module lets you create users and mailboxes in Microsoft 365 at the same time.

While you could use only -MicrosoftOnlineServicesID and -Password parameters to successfully create a new user mailbox, it’s better to add parameters like -MailboxPlan (so you don’t have to use Set-MailboxPlan afterwards):

New-Mailbox -Name MeganB -FirstName Megan -LastName Bowen -DisplayName "Megan Bowen" -MicrosoftOnlineServicesID MeganB -Password (ConvertTo-SecureString -String 'YourPassword' -AsPlainText -Force) -ResetPasswordOnNextLogon $true -MailboxPlan 'MailboxPlan'

Remember that the password needs to meet the password complexity requirements, or the mailbox creation will fail. Learn how to check and configure password complexity (Microsoft’s page)

To create mailboxes in bulk, you need a CSV file with the mailboxes list first. Then, you can import its contents to an array and use the foreach loop to create multiple mailboxes. You can of course use a different file location, and the specific variables’ values will depend on your CSV headers. The script will look like the following:

$mbxs = Import-Csv 'C:\users.csv'
Foreach ($mbx in $mbxs) {
New-Mailbox -Name $mbx.DisplayName -DisplayName $mbx.DisplayName -MicrosoftOnlineServicesID $mbx.UserPrincipalName} -Password (ConvertTo-SecureString -String 'YourPassword' -AsPlainText -Force) -ResetPasswordOnNextLogon $true -MailboxPlan 'MailboxPlan'}

Finally, you can use Set-MsolUser to fill out the rest of your users’ profile details.

Create a shared mailbox with PowerShell

Creating a shared mailbox with PowerShell requires less parameters as it works in a different way. In most cases, shared mailboxes don’t require any licenses and don’t have passwords. On the other hand, you need to take care of setting permissions to those mailboxes, so that licensed users of your choice can access them.

New-Mailbox -Shared -Name 'Marketing' -DisplayName 'Marketing' -Alias 'Marketing'
Set-Mailbox Marketing -GrantSendOnBehalfTo 'Sales and Marketing'
Add-MailboxPermission -Identity Sales -User 'Sales and Marketing' -AccessRights FullAccess -InheritanceType All This sample code creates a new Shared Mailbox named Marketing and grants Full Access and Send on Behalf permissions for the Sales and Marketing security group members.

Read more:

Tools for Exchange Server

Recommended articles

How to migrate from Exchange Server 2016/2019 to Microsoft 365

How to migrate from Exchange Server 2016/2019 to Microsoft 365

Migrating Exchange data to the cloud is not rocket science – explore your options and launch the migration stress-free. As you may already know, Exchange Server 2016 and 2019 have reached end of life and are no longer officially supported by Microsoft. If your organization still uses either of these platforms to manage email, contacts, calendars, and tasks, keep in mind that: Your environment may become vulnerable to newly discovered security threats – Microsoft will no longer provide security updates for Exchange 2016 and 2019 (unless you’ve enrolled in the Extended Security Update program, which ends in October 2026). Your emails may get blocked – Microsoft has started to throttle and block emails sent from unsupported Exchange Server versions to Exchange Online (as I covered in this article). That said, migrating to a supported platform is now the only viable long-term option for keeping your organization’s email environment secure, supported, and fully operational. If your organization wants or needs to keep things on‑premises (and continue using Microsoft’s solutions for that), upgrading to Exchange Server Subscription Edition (SE) is the only path forward. But given Microsoft’s clear preference for its cloud services – evident in the faster rollout of new features and the many security capabilities available exclusively in Microsoft 365 (Office 365) – now is a great time to leave your on‑prem environment behind and migrate to Exchange Online as part of Microsoft 365. While switching over to a new platform might seem like a rough ride, I’ll show you some easy ways to follow when migrating mailboxes from Exchange Server 2016/2019 to Microsoft 365. How to prepare for email migration to Microsoft 365 Before you start the migration process, you need to make sure your environment is ready for the move. For this purpose, you can use this guide in the Microsoft 365 admin center – it will help you connect your organization to Microsoft 365 and integrate your existing user accounts with Microsoft Entra ID. Microsoft also recommends completing the steps below: Set up an SPF record to determine valid email sources for your organization’s Microsoft 365 domain. Set up the Exchange Online Protection service as a means of protection against spam and malware. If you’re behind on updates, make sure to install the latest Cumulative Update (CU). And here is my quick, less obvious Microsoft 365 migration checklist: Verify if your software will work in Microsoft 365 (especially when it comes to server software). Microsoft 365 migration might be the time you learn that there is crucial legacy software that half the company uses and which is hard to replace. Encourage the whole company to clean up projects. It’s much easier to do this before the migration and start fresh. Gather as much information about your on‑premises environment as possible. For example, you might need to recreate access roles and permissions from scratch in the cloud or set up mail flow rules. Without prior research, it will be much more difficult. Verify if you need to migrate service accounts. There can be a lot of them on‑premises and in most cases, you won’t need them after the move. Review mailbox size limits in Exchange Online before migration to see which licenses you’ll need and whic
How to start remote PowerShell session to Exchange or Microsoft 365

How to start remote PowerShell session to Exchange or Microsoft 365

One of many features of the PowerShell command line tool is its ability to connect with and manage the Exchange Server remotely. The procedure described below applies to the classic on-prem Exchange server and to the Microsoft 365/Exchange Online version.
How to migrate Exchange public folders to a shared mailbox in Microsoft 365

How to migrate Exchange public folders to a shared mailbox in Microsoft 365

Still using public folders? Learn how to move them easily to a modern alternative with CodeTwo.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

CodeTwo sp. z o.o. sp. k. is a controller of your personal data.
See our Privacy Policy to learn more.