When using the Office365 admin panel, you can only add a single email address to a mail contact.
If you want to add multiple addresses, you have to use PowerShell. Use the following set of commands to add and confirm these addresses.
-
- To connect powershell to Office 365, perform the following;
- Open powershell
- Type the following command;
$Cred = Get-Credential
-
- Enter the username / password of a valid O365 admin account
- Type the following command;
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/
-Credential $Cred -Authentication Basic –AllowRedirection
-
- Type the following commands;
Import-PSSession $Session
-
- Powershell is now attached to Office365 Exchange and we can run the command to add addresses to the mail contact. The primary address should have uppercase SMTP: prepended – there can be only one uppercase entry for a specific address type.
set-mailcontact "User Name" -EmailAddresses "SMTP:primary.email@domain.com","smtp:secondary.email@domain.com"
- To confirm this has worked run the following command
get-mailcontact "User Name" | select -ExpandProperty EmailAddresses