Error message when you try to migrate users from an on-premises Exchange Server environment to Exchange Online in Office 365: "Unable to connect to the server"

Article translations Article translations
Article ID: 2389390 - View products that this article applies to.

Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

On This Page

PROBLEM

 You use the New Migration Batch Wizard in the Exchange Admin Center in Office 365 or you use the E-mail Migration Wizard in Exchange Control Panel in Office 365 pre-upgrade to try to migrate users from an on-premises Microsoft Exchange Server 2010, Exchange Server 2007, or Exchange Server 2003 environment to Exchange Online. However, you receive the following error message:
Unable to connect to the server. Please check the connection settings you supplied and try again.

CAUSE

This issue occurs for one or more of the following reasons:
  • The on-premises computer that's running Exchange Server is configured incorrectly to accept external connections from the Simple Exchange Migration engine.
  • The user account that's used to access the on-premises mailbox doesn't have the appropriate permissions level to access the mailbox.
  • Autodiscover is set up incorrectly.
  • The fully qualified domain name (FQDN) or remote procedure call (RPC) proxy address isn't entered correctly in the E-mail Migration Wizard.
  • The on-premises version of Exchange isn't supported by the Email Migration Wizard or the New Migration Batch Wizard.

SOLUTION

To fix this issue, follow these steps.

Note Migrating users from on-premises Exchange 2003 isn't supported in Office 365.

Step 1: Check Outlook Anywhere or RPC over HTTP settings on the on-premises Exchange server

Collapse this imageExpand this image
assets folding start collapsed
The New Migration Batch Wizard in the Exchange Admin Center and the E-mail Migration Wizard in Exchange Control Panel use Outlook Anywhere or RPC over HTTP to connect to on-premises mailboxes to migrate data. To confirm whether Outlook Anywhere settings are correct, go to one of the following Microsoft websites:
For Exchange Server 2003: http://technet.microsoft.com/en-us/library/aa997495(v=exchg.65).aspx

For Exchange Server 2007: http://technet.microsoft.com/en-us/library/bb123889(EXCHG.80).aspx

For Exchange Server 2010: http://technet.microsoft.com/en-us/library/bb123741(v=exchg.141).aspx

For Exchange Server 2013: http://technet.microsoft.com/en-us/library/bb123741.aspx

Outlook Anywhere requires that Internet Information Services (IIS) websites for Exchange Server use Basic authentication. For more info about how to set up Basic authentication for Outlook Anywhere, go to one of the following Microsoft websites:
For Exchange Server 2003: http://technet.microsoft.com/en-us/library/bb124462(EXCHG.65).aspx

For Exchange Server 2007: http://technet.microsoft.com/en-us/library/bb124149(EXCHG.80).aspx

For Exchange Server 2010: http://technet.microsoft.com/en-us/library/bb124149(v=exchg.141).aspx
Make sure that Secure Sockets Layer (SSL) is set up for Outlook Anywhere. For more info, go to one of the following Microsoft websites:
For Exchange Server 2003: http://technet.microsoft.com/en-us/library/aa997449(EXCHG.65).aspx

For Exchange Server 2007: http://technet.microsoft.com/en-us/library/aa995982(EXCHG.80).aspx

For Exchange Server 2010: http://technet.microsoft.com/en-us/library/aa995982(v=exchg.141).aspx
If you're using the Staged Migration option or the Cutover Migration option in the Exchange Admin Center to migrate mail data from Exchange Server 2013, Outlook Anywhere must be set up correctly. For more info, go to the following Microsoft website:
http://technet.microsoft.com/en-us/library/bb123741.aspx
If you're trying to migrate users by using the Remote Move option in the Exchange Admin Center, the Mailbox Replication Service Proxy must be enabled on the Exchange servers. For more info, go to one of the following Microsoft websites:
For Exchange Server 2010: http://technet.microsoft.com/en-us/library/ee732395(v=exchg.141).aspx

For Exchange Server 2013: http://technet.microsoft.com/en-us/library/hh529921.aspx
Collapse this imageExpand this image
assets folding end collapsed

Step 2: Confirm that the public certificate is valid for Outlook Anywhere

Collapse this imageExpand this image
assets folding start collapsed
  1. Browse to the Outlook Web App page of your company website. 
  2. In the Website Identification prompt, click View certificates.

    Collapse this imageExpand this image
    Screen shot of the Website Identification prompt, showing View certificates
  3. In the Certificate dialog box, make sure that the date of the certificate is valid and that the certificate is from a trusted authority.

    Collapse this imageExpand this image
    Screen shot of the Certificate dialog box
  4. Click the Details tab.
  5. In the Subject Alternate Name field, make sure that the FQDN for the Outlook Anywhere address of your on-premises Exchange Server environment is listed.

    Collapse this imageExpand this image
    Screen shot of the Details tab, showing the Subject Alternate Name field highlighted
Collapse this imageExpand this image
assets folding end collapsed

Step 3: Use Remote Connectivity Analyzer to perform an Outlook Anywhere test

Collapse this imageExpand this image
assets folding start collapsed
The E-mail Migration Wizard uses Autodiscover to connect to Exchange Server 2007 and Exchange Server 2010 environments and to download the Outlook Anywhere settings. When the migration engine receives the correct response for the Autodiscover service, it uses Outlook Anywhere to connect to the on-premises mailbox.

To troubleshoot connectivity failures to the on-premises Exchange Server environment, follow these steps:
  1. In a web browser, browse to https://testconnectivity.microsoft.com/?TabId=o365.
  2. Under Microsoft Office Outlook Connectivity Tests, do one of the following:
    • If you're migrating users from Exchange Server 2013, Exchange Server 2010, or Exchange Server 2007, click Outlook Autodiscover.
    • If you're migrating users from Exchange Server 2003, click Outlook Anywhere (RPC over HTTP).
    Collapse this imageExpand this image
    Screen shot of the Microsoft Remote Connectivity Analyzer page, showing the test options under the Office 365 tab
  3. Complete all the required fields on the form, and then click Perform Test.
  4. When the test is finished, confirm that it was successful. If the test wasn't successful, use the info that's provided to resolve the connectivity issue.
  5. Use the super user credentials to confirm through Outlook that you can connect to the on-premises Exchange server of the user whom you're trying to migrate.
  6. If you continue to experience the same errors by using those credentials, repeat the test by using the credentials of the user who is set to be migrated.
Collapse this imageExpand this image
assets folding end collapsed

Step 4: Validate the permissions that are required to migrate users from the on-premises Exchange Server environment

Collapse this imageExpand this image
assets folding start collapsed
Exchange Admin Center-based migrations and Exchange Control Panel-based migrations of on-premises mailbox data require that an account that has full access to the on-premises environment be used when the migration is performed. Use the following resources to confirm that your on-premises environment is set up correctly. Be aware that the migration service account will require the Receive As permission to the mailbox database or the Full Access permission to the individual mailbox that has to be migrated. 

For more info about how to provide valid permissions to the migration accounts, see the following Microsoft resources:
For Exchange Server 2003
268754 How to assign users or groups full access to other user mailboxes
821897 How to assign service account access to all mailboxes in Exchange Server 2003
For Exchange Server 2007
http://technet.microsoft.com/en-us/library/bb124097(EXCHG.80).aspx
http://technet.microsoft.com/en-us/library/aa996343(EXCHG.80).aspx
For Exchange Server 2010
http://technet.microsoft.com/en-us/library/bb124097.aspx
For Exchange Server 2013
http://technet.microsoft.com/en-us/library/dd638132.aspx
Collapse this imageExpand this image
assets folding end collapsed

Step 5: Use the Test-MigrationServerAvailability cmdlet to obtain additional details about the error

Collapse this imageExpand this image
assets folding start collapsed
To test the connection to the remote server by using Windows PowerShell in Exchange Online, run the Test-MigrationServerAvailability cmdlet.

The following is an example of how to use this command to test access to a server that's running Exchange Server 2007 and on which Autodiscover is set up:
$PSCredentials = Get-Credential
Test-MigrationServerAvailability -Autodiscover –EmailAddress administrator@contoso.com -Credentials $PSCredentials -Verbose 

The following is an example of how to use this command to test the connection to a server that's running Exchange Server 2003 or on which Exchange Autodiscover isn't set up:
$PSCredentials = Get-Credential

Test-MigrationServerAvailability -Exchange -ExchangeServer exch2k3.contoso.com -Credentials $PSCredentials -RPCProxyServer mail.contoso.com -Authentication NTLM -Verbose


The results from running this cmdlet should give you more info about exactly where the connection may be failing.
Collapse this imageExpand this image
assets folding end collapsed

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2389390 - Last Review: September 12, 2013 - Revision: 46.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for small businesses  (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Microsoft Exchange Online
Keywords: 
o365 o365a o365e o365p kbgraphxlink o365022013 after upgrade o365062011 pre-upgrade o365m kbgraphic KB2389390

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com