Skip to main content

Office365: New-MoveRequest causes MRSProxy.svc or "the connection to the server could not be completed" error in hybrid organization

Update for this issue is available here:


This is one of nagging problems which could be caused by many things.

It's not easy to track this.

When you try to move mailboxes between on-premises and the cloud, you see errors.
In the powershell you see something like this:

The call to '' failed. Error

details: The HTTP request is unauthorized with client authentication scheme

'Negotiate'. The authentication header received from the server was

'Negotiate,NTLM,Basic realm=""'. --> The remote server

returned an error: (401) Unauthorized..

    + CategoryInfo          : NotSpecified: (:) [New-MoveRequest], RemoteTrans


    + FullyQualifiedErrorId : [Server=DBXPR99MB999,RequestId=something,TimeStamp=1/20/2014 1:13:53 PM] [FailureCategory=Cmdle

  t-RemoteTransientException] B92B1723,Microsoft.Exchange.Management.Recipie


    + PSComputerName        :

Instead of giving you full description to track this issue, I propose you to try use the PowerShell to move mailboxes to the Office365.

What causing the problems?
In hybrid configuration you have configured different default domain from the one that is set in  Office365. Instead of logging to Office365 as a new domain, let's say,, you should use AD domain credentials, let's use for example and with format of DOMAIN\username, and NOT in username@domain.

Let's do it:

Connect to Office365 with Windows Azure Module for Active Directory.
(detailed description here:

In Azure add-in, you should go with it:

$cred = Get-Credential – in the format of

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $cred -Authentication Basic -AllowRedirection

Import-PSSession $Session

Then  after connect to Office365 enter the followings:

$cred=get-credential – Credentials should be in format\username

New-MoveRequest -identity USERTOMOVE -Remote -RemoteHostName -TargetDeliveryDomain -RemoteCredential $cred -BadItemLimit 50 -LargeItemLimit 50

RemoteHostName parameter is a CAS server with MRSProxy enabled http address (probably the same as the local OWA or ActiveSync for on-premises users).
BadItemLimit and LareItemLimit are optional parameters

For me it works, so some of you should be happy too:)