SharePoint Online site mailbox: add email addresses

In my last article on Creating SharePoint Online site mailbox I discussed at length creating and renaming a SharePoint Online site mailbox, both from user interface and Powershell. There are, however, more options available for those who wish to modify the site mailbox address and that's adding another email address. 

How will it work?

Imagine that your users have difficulty remembering SMO-SiteName@domain.onmicrosoft.com email address and you would like to give them as an alternative something easy to remember and use. Let us say - FancyAddress@MyDomain.com. Some of the users will be sending emails to SMO-SiteName@domain.onmicrosoft.com, and some to FancyAddress@MyDomain.com. All the emails, however, should come into one mailbox - site mailbox on SiteName SharePoint Online site.

The option is not available from User Interface, we have to resort to Powershell. This time we will use a widely-available module Azure Active Directory Module

Steps

  1. First let's install the required Microsoft Online Services Sign-In Assistant for IT Professionals RTW from the Microsoft Download Center. Then install the Azure Active Directory Module for Windows PowerShell (64-bit version), and click Run to run the installer package.

  2. Run the the Azure AD Powershell as an Administrator:

  1. Personally I am a fan of "Start-Transcript" cmdlet which records the whole session - the cmdlets you run and their output. So humour me, and run:
Start-Transcript
  1. You should receive a notification like in the screenshot above that transcript has started and the output file path is .....   Usually it is in the Documents.

  2. In order to run any msol cmdlets, like get-msoluser, we have to connect. The following cmdlets will show a box prompting you for credentials. Use administrator's credentials! 

$msolcred = get-credential
connect-msolservice -credential $msolcred
  1. Now we will create a PSSession. We will need this one for get-mailbox / set-mailbox cmdlets. 
$sesja=new-pssession -configurationname microsoft.exchange -connectionuri https://ps.outlook.com/powershell/  -credential $msolcred -authentication basic -allowredirection 
 
import-pssession $sesja
  1. Once the environment is prepared, let's check the properties of our site mailbox. I'm particularly interested in one property "ProxyAddresses" so I will use |select ProxyAddresses.  Normally to get the properties of a mailbox, we would use Get-Mailbox cmdlet. Not with a site mailbox though!

  1. As you can see in the screenshot, Get-Mailbox cmdlet didn't return any site mailboxes (and I promise I do have them). Let's try with Get-SiteMailbox:

  1. Nothing. Let's try then with Get-MsolUser:

  1. Ta-daa! Worked.  The more surprised you will be to find out that in order to add another email address, you need to use Set-Mailbox cmdlet:
Set-Mailbox -Identity SMO-MysiteMailbox@domain.onmicrosoft.com -EmailAddresses @{add="SecondAddress@VanityDomain.com"}

Don't forget to add first the VanityDomain to the list of your domains in Office 365 !

  1. Now the last cmdlet - just to verify the effects of our work:
Get-MsolUser -UserPrincipalName SMO-MysiteMailbox@domain.onmicrosoft.com | fl

  1. Under the ProxyAddresses attribute, you can see all my site mailbox email addresses. 

  2. Don't forget to 

Stop-Transcript

A proxy address is by by definition the address by which a Microsoft Exchange Server recipient object is recognized in a foreign mail system. Proxy addresses are required for all recipient objects, such as custom recipients and distribution lists.1

Summary

This article covered how to add a proxy address for a site mailbox, which will serve not as a main address, but additional one. For the easy reading full set of cmdlets without the comments:

Start-Transcript

$msolcred = get-credential
connect-msolservice -credential $msolcred
$sesja=new-pssession -configurationname microsoft.exchange -connectionuri https://ps.outlook.com/powershell/  -credential $msolcred -authentication basic -allowredirection
 
import-pssession $sesja
Set-Mailbox -Identity SMO-MysiteMailbox@domain.onmicrosoft.com -EmailAddresses @{add="SecondAddress@VanityDomain.com"}

Get-MsolUser -UserPrincipalName SMO-MysiteMailbox@domain.onmicrosoft.com | fl

Stop-Transcript

Other languages

This site is available in other languages:
Wiki: SharePoint Online: Dodatkowe adresy e-mail do skrzynki pocztowej witryny

Creating SharePoint Online site mailbox

http://c.statcounter.com/10258689/0/e0a8528c/0/