Automating Site Mailboxes in SharePoint 2013 and Exchange 2013

One of the completely new features to ship with SharePoint and Exchange 2013 is the new Site Mailboxes capability to give a unified view of both documents and emails in SharePoint and Outlook. For an overview of the feature, see the Product Group’s posting here and for first time configuration information see here.

In this post, I’ll be exploring how Site Mailbox provisioning can be automated in an on premises install of Exchange and SharePoint. At present, hybrid scenarios are not supported for Site Mailboxes – i.e. both SharePoint and Exchange should either be on premises or both in the Cloud.

I’ll be running these commands from a SharePoint server and so using remote PowerShell to connect to the Exchange server (called ukmcs15-ex in this example). The following code needs credentials with permission to allow site mailbox creation.

$user = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ukmcs15-ex/powershell -Credential $user
Import-PSSession $session
Add-PSSnapin Microsoft.SharePoint.Powershell


First, in my lab environment, I need to do some one off housekeeping to support OAuth over HTTP. Please note, this is not recommended for production environments and only used here to simplify the configuration without using SSL certificates:

$s = Get-SPSecurityTokenServiceConfig
$s.AllowMetadataOverHttp = $true
$s.AllowOAuthOverHttp = $true


Now, I’ll define the variables for my mailbox. This includes its team site URL, mailbox alias, mailbox display name and one mailbox owner.

$url = http://fifteen/sites/AnotherSiteMailbox
$address = "anothersitemailbox"
$display = "Another Site Mailbox"
$owner = "UKMCS\alexdo"


Let’s do the SharePoint configuration first.

$site = New-SPSite -Url $url -OwnerAlias $owner -Template "STS#0" -Name $display
$web = $site.OpenWeb()
Enable-SPFeature "CollaborationMailbox" -Url $url


And now the Exchange side to create and link the site mailbox.

$mailbox = New-SiteMailbox -SharePointUrl $url -Name $address -DisplayName $display
$mailbox | Set-Mailbox -Language "en-GB"
$mailbox | Set-MailboxRegionalConfiguration -TimeZone "GMT Standard Time"


You’ll see how I’ve deliberately set a mailbox owner and regional configuration to allow end users to open the Outlook Web Access view without additional prompts.

The finished result in Outlook:


Whilst this code sample is basic, I hope it provides a starting point to allow scripting of site mailbox creation to meet your requirements.

Alex O’Donnell
SharePoint Consultant
Microsoft Consulting Services UK

Comments (21)

  1. AlexK says:

    Hi Alex,

    Thanks for posting these steps. The only problem I came across was with last step:

    PS C:> $mailbox = New-SiteMailbox -SharePointUrl $url -Name $address -DisplayNa

    me $display -Owners $owner

    A parameter cannot be found that matches parameter name 'Owners'.

  2. Alex,

    Thanks for the update. You're absolutely right, the Owners parameter has now been removed in the RTM version of Exchange 2013 – I'll update the blog.

    This means the automatic permissions synchronisation will inherit mailbox permissions from SharePoint site permissions.

    Hope this helps.


  3. Kiran says:

    Thanks for the nice easy workflow. After i follwed all steps and i am seeing below error when i try to open site mailbox in share point ? Any idea on this ?

    We are having trouble contacting SharePoint Server

    The server might be temporarily unavailable. Please check back on this page in a few minutes. If this problem persists, please contact your system administrator.



  4. Kiran says:

    Also one more comment i have is, below command did not work for me unless i have specfied -force.

    $mailbox = New-SiteMailbox -SharePointUrl $url -Name $address -DisplayName $display -force

    I was getting below error.

    [PS] C:Windowssystem32>$mailbox = New-SiteMailbox -SharePointUrl $url -Name $address -DisplayName $display

    SharePoint site "http://sharepointsrv/sites/AnotherSiteMailbox" couldn't be contacted because of the following the

    error: "WebException – Status:RequestCanceled; Message:The request was aborted: The request was canceled.;HttpStatusCod





    charset=utf-8}{Server:Microsoft-IIS/8.0}{WWW-Authenticate:Bearer realm="c927a690-fc2d-453a-8d6c-41b31cc9f6f6",client_id



    -MS-InvokeApp:1; RequireReadOnly}{Date:Wed, 30 Jan 2013 20:42:50 GMT}{Content-Length:16}". Please try again later. If

    the problem continues, contact your helpdesk.

       + CategoryInfo          : NotSpecified: (:) [New-SiteMailbox], RecipientTaskException

       + FullyQualifiedErrorId : 8639E98E,Microsoft.Exchange.Management.RecipientTasks.NewSiteMailbox

       + PSComputerName        :

  5. Kiran says:


    I am seeing sitemailbox is showing disabled as user under Active directory. Is this expected ? Could you please tell me if there any steps which i need to follow to access this site mailbox. Also is the site mailbox supported to access through OWA ?


  6. Kiran says:


    I am getting below error while accessing site mailbox.

    Your SharePoint Server configuration is not supported

    Your organization's SharePoint Server configuration is not supported. Please contact your system administrator for more information.

    Correlation ID: 67fdf99b-8f74-606f-37f8-69398ab2959e, Error Code 104


  7. Kiran,

    Before attempting the automation above, I'd validate that manual provisioning works through SharePoint. The above error sounds like the OAuth trust isn't setup correctly so you may want to re-validate the configuration steps.

    Site mailbox user objects will show as disabled in Active Directory – this is expected. Whilst the web view of the site mailbox is rendered through OWA, it won't show alongside the user's mailbox in the normal way.

    Hope this helps.

    Best wishes,


  8. SQLSMS.NET says:

    Alex, How is it different from Public folder in exchange if you create them so they are available in sharepoint 2010 site.



    browse for cloud

  9. Sarah,

    This is the completely new SharePoint 2013 and Exchange 2013 functionality and very different from traditional Exchange Public Folders. Site Mailboxes are designed to give a view of both documents and emails from both SharePoint and Outlook. Public Folders are primarily Outlook based and don't offer native SharePoint site integration.


  10. Jason says:

    If a document is attached to a message that is sent to a site mailbox, will SharePoint crawl the contents of that attached document?  

  11. Jason – in this scenario, mail attachments will only be crawled by SharePoint once they are stored in a SharePoint document library. So dragging the attachment from an email in to a Site Mailbox's Documents folder would work.

  12. Dean Gross says:

    How can we specify the domain that is used when Site Mailboxes are created in Office 365? For historical reasons, We have many active domains in 0365 and when a Site Mailbox is created one of the old domains is used, I need to set a different domain as the default, but I can't find any way to configure this.



  13. Dean,

    Whilst this is configurable in an on premises scenario, I don't believe this can currently be configured in Office 365. As you may have seen, you have only limited control over the prefix as per…/jj710340(v=exchg.150).aspx.

    I'd recommend raising a support request to see if there are any other options available.


  14. PrasadWT says:


    thanks for the article.

    i am setting up the site mail box feature. so, i created the web application and configured on the root. and i am able to see the Mailbox on the  quick launch and when i clicked my outlook web app is opened and i saw my outlook e-mails.

    ref link :…/jj552524.aspx

    now i have created a  team site[ sub site] on this sitecollection and added a site mailbox app.but when i clicked on this site mailbox app,

    i am getting the error

    Your organization's SharePoint Server configuration is not supported. Please contact your system administrator for more information.

    Correlation ID: 146b899c-d945-c049-2b8f-9681aa652934, Error Code 8

    can you pls  point me  why this error appears and whats the  resolution.

    as per my requirement, i will be having some 20  team sites[ sub sites] which will have to use different email ids.

    so as per the site mailbox concept / config.  can'ti create a  20 team sites and associate the  20 email ids to these 20 site milboxes?

    help is highly appreciated!

  15. Prasad,

    You shouldn't have any issues with sub-sites having a site mailbox. The error above is a little generic, you really need to track down that correlation ID in the ULS logs to find the root cause. It could be an intermittent configuration issue that wasn't present when you made the first mailbox. For example if you have multiple front ends and the EWS binaries aren't present on each server.


  16. Adrian R says:


    Stumbling upon this, I realized that this may be the answer to my issues.

    Currently when you create a site mailbox for a users personal site, the app will create one with that persons name but it is not smart enough to realize that the user already has an e mail box set up in exchange. Is there any way to assign existing mailboxes in exchange to a site or is there any way to have the app create user mailboxes and use their existing exchange mailbox for a site mailbox?


  17. Adrian,

    To be honest, I'd steer clear of this approach. You may notice that this scenario is explicitly blocked in Office 365 and you now can't add a site mailbox to a personal site. Whilst you may be able to hook one up with the Set-SiteMailbox cmdlet, I'd explore other options for Exchange / SharePoint integration on premises or look out for Unified Groups in Office 365 –…/the-garage-series-for-office-365-work-like-a-network-a-first-look-at-enterprise-social-updates-with-yammer.


  18. Priyanka says:

    Can anyone help me here to come out from the issue, i have mentioned the error details below.

    When i tried to access the Site Mailbox in My SharePoint site it throws the "Correlation ID: 04a5d49c-4883-501d-4b1d-7fa9bc66c345, Error Code 104".

    Am having farm administrator access and also i have checked the corresponding Features which are in Active state.

    Kindly suggest for further process…..

  19. EccoRM says:


    Any updates about hybrid scenario? I'm planning to configure site mailbox using SharePoint onpremise and Exchange online. Thanks.

  20. Stome007 says:

    Does Site mailbox of sharepoint 2013 work with exchange server 2010?

    Regard, Stome007

  21. Daniel says:

    Can I bump the Hybrid Scenario…I have a SharePoint 2013 on premise farm with a Hybrid Exchange (Office365) scenario. Is this possible if mailboxes are on prem?????