The following article deals with setting up, configuring and troubleshooting of SharePoint Online site mailboxes. It refers to on-premises Exchange environment only for comparison and may not describe its full capabilities.

Site Mailbox

A site mailbox can be used from a SharePoint team site to store and organize team email. It can also be used from Outlook 2013 for team email, and as a way to quickly store attachments and retrieve documents from the team site.

You can add one site mailbox per site.

How to change the name?

Right after you have created a site mailbox with default settings, you end up with ugly

The mailbox will not be found in Exchange Admin Center nor through get-mailbox cmdlet.  You will see them in Office 365>Active Users or through get-msoluser.

You can change the UserPrincipalName of the site mailbox using:

Set-msoluserPrincipalname –UserPrincipalname –NewUserPrincipalName

This, however, may not be useful if you are faced with several or several hundreds of site mailboxes. The thing to consider is a Provisioning Policy for all site mailboxes.

You can view the current settings by typing in Get-SiteMailboxProvisioningPolicy | fl

Let’s modify the AliasPrefix. It is the SMO- that appears by default in front of all your currently provisioned site mailboxes.

In order to do that you need to Enable-OrganizationCustomization. If it’s not enabled, you will receive an error:

There are certain limitations for the prefix that you have to follow:

- It cannot start with a number

- It cannot end with a dot

-It cannot have consecutive dots

- The value should be a combination of letters, numbers, and allowed special characters, e.g.   dot, comma, underscore and hyphen         “,” ” .” ” _” ”-“

If you prefer to create the mailbox without the prefix, just enter empty string  “”.

The settings will apply for mailboxes created both through Powershell and manually on the website through Site Contents>Add an app>Site mailbox.

New-SiteMailboxProvisioningPolicy is available in on-premises Exchange but not for the Online environment.


Site mailbox size is 5 GB across all plans.

It is possible to raise this limit in an on-premises Exchange environment, where the 5GB is not a limit but a default setting. Site mailbox size is unchangeable in Sharepoint/Exchange Online. As we can read in set-sitemailboxprovisioningpolicy description, the ProhibitSendReceiveQuota, IssueWarningQuota, and MaxReceiveSize are available only in on-premises Exchange 2013.

How to create a site mailbox?

In order to add a mailbox to your site, you need to activate site mailbox feature from the site settings.


Go to your site>Click Gear icon>Site settings>Site features>Site Mailbox>Activate

Go to your site>Click Gear icon>Site Contents>Add an app>Site mailbox

 You can follow an article here for more details and picture instruction:


There is no Sharepoint Online Powershell equivalent of on-premises Enable-SPFeature. That means we have to resort to CSOM, i.e. Client-Side Object Model, in order to enable the Site Mailbox feature:

You will need SharePoint SDK, Azure AD module and SharePoint Online Management Shell installed:

# adding the SDK

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"  

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"  


# creating the client context

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($site)   
$ctx.Credentials= New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)

# loading the site

$rootWeb = $ctx.Web  

# creating the feature’s GUID. In order to enable the feature, we need to know its GUID. The list of GUIDs can be found here:

For Site Mailbox feature it is "502a2d54-6102-4757-aaa0-a90586106368" .

$featureguid=new-object System.Guid $feature  

#enabling the feature

$rootWeb.Features.Add($featureguid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None) 

Now that we have the feature enabled, we can move on to adding the site mailbox.

# we need to open a new session

$credy= New-Object System.Management.Automation.PSCredential($username,$password) 
import-module msonline 
connect-msolservice -credential $credy 
$sesja=new-pssession -configurationname -connectionuri -credential $credy -authentication basic -allowredirection 
import-pssession $sesja 

# creating the mailbox is already pretty straightforward

new-sitemailbox -displayName “Title” -SharePointUrl $rootWeb.Url 

Seems complicated? Certainly more than doing it manually!

The main use for scripting is when you do a lot of something: bulk-add users, bulk-create mailboxes or in our case: bulk-enable the feature and bulk-add site mailboxes. Below you will find a ready script for adding mailboxes to all sites on the whole tenant!

You can also try with one site or site collection:

Happy SharePoint mailboxing!

Other languages

This site is available in other languages:

Wiki: Tworzenie skrzynek pocztowych witryny SharePoint Online (pl-PL)