Change SharePoint Online Site Mailbox Primary email

Featured image

About Site Mailbox

Site Mailbox in SharePoint Online is a mail-enabled document library, which is a central email and document sharing account that is accessed from a SharePoint site.

Real-Time Scenario

You can create a site mailbox in your SharePoint Team site and you can use it to gather relevant team-level email conversations for tracking a team project or maintain support history etc. Since, it can be accessed from Outlook client for team email, it helps to quickly store attachments and retrieve documents from the team site. Also members of team site can share important documents securely by using a site mailbox.


Once a site mailbox is set up for your SharePoint site, a new email account is created and email address of the site mailbox will auto generated, which uses the name of your site. For example - if your team site URL is -, then the PrimarySmtpAddress for that site’s site mailbox will be So it naturally becomes the responsibility for the administrators to personalize the PrimarySmtpAdress. So in this blog we share the steps for the same.

PowerShell script to change Site Mailbox PrimarySmtpAddress

Since there is no option available in user interface to change the PrimarySmtpAddress of the site mailbox, we are left only with PowerShell method. In this example, I have created a site mailbox in my SharePoint Team site with SharePoint Team site name – > “SupportTeam” and site mailbox -> SMO- My requirement is to modify the PrimarySmtpAddress of my site mailbox from

Following are the steps to achieve the above requirement, Before proceeding to modify the PrimarySmtpAddress of site mailbox, let me get the list of SharePoint sites with Site Mailbox using the PowerShell command as follows,

  Get-SiteMailbox | select DisplayName, PrimarySmtpAddress 

Where, DisplayName - Denotes SharePoint Site name PrimarySmtpAddress - Denotes PrimarySmtpAdress of Site Mailbox of the corresponding SharePoint Site

Now it’s time to modify the PrimarySmtpAddress of site mailbox of SharePoint site – “SupportTeam” Steps involved to achieve this

  1. Get the SharePoint sitename and store it in the variable - $sitename.
  2. Get the new Site Mailbox PrimarySmtpAddress and store it in the variable - $newprimarysmtpaddress.
  3. Change your Site Mailbox’s PrimarySmtpAddress using PowerShell command ‘Set-Mailbox’.
  Set-Mailbox $sitename –EmailAddresses SMTP:$newprimarysmtpaddress 

Finally to ensure new PrimarySmtpAddress applied to site mailbox of the SharePoint site, use the PowerShell command as follows,

  Get-SiteMailbox  $sitename  | select DisplayName, PrimarySmtpAddress