Google Apps – Office365 email co-existence

I recently migrated a large Google Apps tenant to Microsoft Office365 (10k + users). Google require a verification code to set up forwarding to a user’s alias. Which means it is not possible to automate the forwarding from Google Apps to Office365.

So the way we enable co-existence is as follows.

Domain Name : 

  1. Add an alias domain into Google Apps. Google state that this can take up to 24 hours. I have seen it complete in 10 hours. This will add an alias to all Google Apps users
  2. Export all Office365 user’s userprincipal names to a csv.
  3. Enable forwarding for all users in Office365 to their This is done by using the following powershell command in Exchange Online.
    Import-Csv “C:\Users\sofarrell\Desktop\RelayAddress.csv” | Foreach-Object{Get-Mailbox $_.DisplayName | Set-Mailbox -ForwardingSMTPAddress $_.MailAddress -DeliverToMailboxAndForward $true} -verbose
  4. When the last mailbox has migrated we then remove the forwarding and edit the delivertomailboxandforward value.
    Get-Mailbox | Set-Mailbox -ForwardingSmtpAddress $null -delivertomailboxandforward $false

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s