Cannot migrate mailboxes from Office 365 to on-premises Exchange 2013

I have had many problems transferring mailboxes from Office 365 to my on-premises Exchange 2013 server. I enabled hybrid mode and configured DirSync and neither option helped. Here is the command I have been running on my on-premises server:

New-MoveRequest -Identity user@contoso.com -Remote -RemoteHostName "contoso.onmicrosoft.com" -TargetDeliveryDomain "mail.contoso.com" -RemoteCredential (Get-Credential)

I have tried several methods and run into a different error each time.

Scenario 1: Create user through ECP (user is also created in AD)
Result: Target user 'User' already has a primary mailbox.
    + CategoryInfo          : InvalidArgument: (user@contoso.com:MailboxOrMailUserIdParameter) [New-MoveRequ
   t], RecipientTaskException
    + FullyQualifiedErrorId : [Server=EXCHANGE,RequestId=3140c245-b4d9-42be-bd5b-d91754259fef,TimeStamp=4/15/2015 4:17
   2 PM] [FailureCategory=Cmdlet-RecipientTaskException] 525A027C,Microsoft.Exchange.Management.RecipientTasks.NewMo
  eRequest
    + PSComputerName        : exchange.contoso.local

Scenario 2: Create user through AD without creating a mailbox
Result: The operation couldn't be performed because object 'user@contoso.com' couldn't be found on
'ContAD.contoso.local'.
    + CategoryInfo          : NotSpecified: (:) [New-MoveRequest], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=EXCHANGE,RequestId=df496aa2-919a-4736-b07b-622730628995,TimeStamp=4/15/2015 4:20
   3 PM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 138F7556,Microsoft.Exchange.Management.Recipient
  asks.NewMoveRequest
    + PSComputerName        : exchange.contoso.local

Scenario 3: Create user through ECP and manually clear msExch properties with ADSI (to work around another error where the Mailbox GUID was not found on premises)
Result: The critical property 'ExchangeGuid' is missing in the UserMailbox object 'User'.
    + CategoryInfo          : InvalidArgument: (user@contoso.com:MailboxOrMailUserIdParameter) [New-MoveRequ
   t], RecipientTaskException
    + FullyQualifiedErrorId : [Server=EXCHANGE,RequestId=eb611fe2-3450-47f2-be76-08597e5ff2fc,TimeStamp=4/15/2015 3:50
   0 PM] [FailureCategory=Cmdlet-RecipientTaskException] A76AB784,Microsoft.Exchange.Management.RecipientTasks.NewMo
  eRequest
    + PSComputerName        : exchange.contoso.local

Am I missing something really obvious? I'm not sure if the on-premises AD needs user accounts created before moving the mailboxes or if the user shouldn't exist before moving or if the user does need to exist, but I need to configure it to allow a mailbox transfer.
Barry WhatleyIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmitIT ArchitectCommented:
Watch this video for hybrid setup
http://channel9.msdn.com/Series/Migrating-to-Exchange-Online/01

Last part is live demo for hybrid setup.

I advise you to open MS case. As Office 365 servers are in MS control, they will be able help you easily.
0
Vasil Michev (MVP)Commented:
You need to have mail users created on-prem, and you need to populate the ExchangeGUID.

There is a very detailed guide posted here: http://www.msexchange.org/articles-tutorials/office-365/exchange-online/migrating-standalone-office-365-tenant-exchange-2010-part1.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Barry WhatleyIT ManagerAuthor Commented:
I've been having a problem setting the ExchangeGUID through Get-RemoteMailbox because the command cannot apparently see any of the mailboxes in AD. I was able to convert the GUID correctly to hexadecimal and manually change it using ADSI, but then I get the message that the user already has a primary mailbox. So with the wrong GUID, I get the error no mailbox with GUID could be found and with the correct GUID, it says the user already has a primary mailbox. Does Get-RemoteMailbox change something else other than the AD property?
0
Barry WhatleyIT ManagerAuthor Commented:
Figured it out. I was previously creating a user through ECP and it was creating a new mailbox. The trick mentioned on MSExchange was to create a new mail user. Creating the users this way allowed Office 365 to perform the migration with no problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.