Thursday, January 2, 2014

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 .onmicrosoft.com 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 : Contoso.com 


  1. Add an alias domain into Google Apps. Relay.contoso.com. 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  user@relay.contoso.com
  2. Export all Office365 user's userprincipal names to a csv.
     
  3. Enable forwarding for all users in Office365 to their smtpaddress@relay.contoso.com. 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

No comments:

Post a Comment