Create Shared Mailboxes with Same Alias at Different Domains in Office 365
I came across an interesting puzzle over at the Spiceworks Office 365 Forums this weekend. A user was trying to add two shared mailboxes to their Office 365 tenant with the same alias.
Trying to create a Shared Mailbox in the normal way resulted in an error.
I tried to do this in my own environment. I already had a shared mailbox called firstname.lastname@example.org, and I wanted to add another one called email@example.com. Here’s what happened.
PS C:\Users\burns_000\Desktop> New-Mailbox -Name "Test Shared Mailbox" -Alias test_shared -Shared -PrimarySMTPAddress firstname.lastname@example.org Windows Live ID "email@example.com" already exists as a managed Windows Live ID. To use the existing Windows Live ID, use the UseExistingLiveId parameter. + CategoryInfo : NotSpecified: (0:Int32) [New-Mailbox], WLCDManagedMemberExistsException + FullyQualifiedErrorId : A5FDB8CC,Microsoft.Exchange.Management.RecipientTasks.NewMailbox + PSComputerName : pod51016psh.outlook.com
Turns out that there isn’t a very intuitive way to do this. In order to achieve this, you need to create the shared mailbox with a different alias and then change the WindowsLiveID manually once it is created. For example:
Create the shared mailbox with a different alias.
PS C:\Users\burns_000\Desktop> New-Mailbox -Name "Test Shared Mailbox 2" -Alias test_shared2 -Shared -PrimarySMTPAddress firstname.lastname@example.org Name Alias ServerName ProhibitSendQuota ---- ----- ---------- ----------------- Test Shared Mailbox 2 test_shared2 db3prd0610mb356 24.75 GB (26,575,110,144 bytes)
You can now see the mailbox and the UPN it has been assigned.
PS C:\Users\burns_000\Desktop> get-mailbox test_shared2 | select userprincipalname UserPrincipalName ----------------- email@example.com
You can also see this in the Exchange Control Panel.
So how do we set the correct login name? With the Set-Mailbox command like this:
PS C:\Users\burns_000\Desktop> set-mailbox test_shared2 -MicrosoftOnlineServicesID firstname.lastname@example.org
And viola, we have the correct UPN.
PS C:\Users\burns_000\Desktop> get-mailbox test_shared2 | select userprincipalname UserPrincipalName ----------------- email@example.com
We can also verify this in the Exchange Control Panel.
And here are our two shared mailboxes, at different domains!