skip to Main Content

Run the Hybrid Configuration Wizard (HCW)

In the previous article, we did install and configure Azure AD Connect to sync identities between on-premises and Office 365. In the next task, we will install and run the Hybrid Configuration Wizard (HCW). The HCW will ensure that we have an Exchange hybrid deployment between two Exchange environments.

Hybrid Configuration Wizard progress

The general phases of the hybrid deployment configuration process are:

  1. Verifying prerequisites and performing topology checks
  2. Testing account credentials
  3. Making hybrid deployment configuration changes

Before you start

It’s good to know that you can configure one or more Exchange Servers for Hybrid. Open port 25 and 443 on the Exchange Servers. These Exchange Servers need to be Client Access Servers (CAS). In this example, we will use Exchange Servers EX01-2016 and EX02-2016 for Hybrid.

Exchange Servers up to date

Make sure that the Exchange Servers are on the latest version. Run Exchange Management Shell as administrator and use the Get-ExchangeServer cmdlet to check the Exchange Server versions. Always keep the Exchange Servers up to date.

[PS] C:\>Get-ExchangeServer | Format-Table Name, Edition, AdminDisplayVersion

Name         Edition AdminDisplayVersion
----         ------- -------------------
EX01-2016 Enterprise Version 15.1 (Build 2176.2)
EX02-2016 Enterprise Version 15.1 (Build 2176.2)

Enable MRS proxy

If you don’t complete this step before running the HCW, the HCW will enable MRS proxy. However, we recommend that you complete this step before running the HCW to ensure the IIS cache has time to clear before HCW validates the endpoint.

Use the Get-WebServicesVirtualDirectory cmdlet to check if MRS proxy is enabled.

[PS] C:\>Get-WebServicesVirtualDirectory | Format-Table Server,MRS*

Server    MRSProxyEnabled
------    ---------------
EX01-2016           False
EX02-2016           False

If it’s not enabled, enable the Mailbox Replication service (MRS) proxy on the EWS virtual directory.

[PS] C:\>Get-WebServicesVirtualDirectory -ADPropertiesOnly | Where {$_.MRSProxyEnabled -ne $true} | Set-WebServicesVirtualDirectory -MRSProxyEnabled $true

Another way to enable MRS proxy is with Exchange Admin Center.

Go to servers > virtual directories. Select All Servers and select EWS to filter on that type. Double-click on the EWS virtual directory in the list view.

Exchange Server on-premises virtual directories EWS

Click on general and Enable MRS Proxy endpoint. Do this for both the Exchange Servers.

Enable MRS Proxy endpoint

Remove previous Hybrid Configuration Wizard version

Go to Programs and Features in Control Panel and verify that a previous Hybrid Configuration Wizard is not already installed. If it is, uninstall it.

In the next step, you will download and install Office 365 Hybrid Configuration Wizard step by step.

Download Hybrid Configuration Wizard

You can run the Hybrid Configuration Wizard from other Windows Servers or a workstation. We recommend to sign in on an Exchange Server and install the HCW directly on the Exchange Server.

Start Internet Explorer and copy-paste the link (Microsoft). If you use other web browsers, it might not work as expected. That’s why we recommend using Internet Explorer.

If you don’t get the HCW install window, read the article Office 365 Hybrid Configuration Wizard can’t start.

Install Hybrid Configuration Wizard

After you download the Hybrid Configuration Wizard setup, click Install.

Install Microsoft Office 365 Hybrid Configuration Wizard

The Microsoft Office 365 Hybrid Configuration Wizard installer is running.

Installing Microsoft 365 Hybrid Configuration Wizard

Run Hybrid Configuration Wizard

After downloading and installing, the first screen of the wizard shows up. Click next.

Hybrid Configuration Wizard

The Hybrid Configuration Wizard will detect the optimal Exchange Server. Click on next.

Hybrid Configuration Wizard on-premises Exchange Server organization

Change the on-premises Exchange administrator account credentials if you want. In our example, we will keep the same user that’s logged in. Click sign in and enter the Office 365 Exchange Online Account. Click next.

Hybrid Configuration Wizard on-premises Exchange account

It will gather both accounts’ information and check if it can connect to Exchange on-premises and Exchange Online. Click next.

If it fails, read the article Hybrid Configuration Wizard fails to connect.

Hybrid Configuration Wizard gathering configuration information

Choose Full Hybrid Configuration and select the checkbox Organization Configuration Transfer.

Hybrid Configuration Wizard hybrid features

Select Use Exchange Modern Hybrid Topology. Click next.

Do you want to keep mailboxes on-premises? Choose Exchange Classic Hybrid Topology because you want to configure hybrid modern authentication in Exchange on-premises.

Hybrid modern authentication with Exchange Modern Hybrid Topology (Hybrid Agent) is not supported.

Hybrid Configuration Wizard hybrid topology

Go to Active Directory Users and Computers. Create a service account svc-hybridmigrations. Make it a member of the group Organization Management.

Hybrid Configuration Wizard ADUC service account

Exchange Online will use the credentials to connect to your on-premises Exchange Server to move mailbox data to the cloud. It means that it will go to need some special privileges. If you enter your administrator account credentials here, it will work. But, it’s a member of the domain admins group and a powerful account for such a task.

Instead, you can create a special service account and add it to the Organization Management group. Fill in the credentials that you created in the above step. Click next.

Hybrid Configuration Wizard on-premises account for migration

The Hybrid Agent setup will start to download, install, register, and validate the Hybrid Agent. Click next.

Hybrid Configuration Wizard hybrid agent setup

Select Configure my Client Access and Mailbox servers for secure mail transport (typical). If you have an Edge Transport server, use the second option. Click next.

Hybrid Configuration Wizard hybrid configuration

Choose both Exchange Servers for the receive connector. Click next.

Hybrid Configuration Wizard receiver connector configuration

Choose both Exchange Servers for the send connector. Click next.

Hybrid Configuration Wizard send connector configuration

Select the certificate. Click next.

Hybrid Configuration Wizard transport certificate

Fill in the DNS name that represents your on-premises Exchange Organization for hybrid mail flow. This determines where Exchange Online Protection will connect to in order to route email from the cloud to the on-premises organization. Click next.

Hybrid Configuration Wizard organization FQDN

Choose Review the objects before transferring from on-premises to Exchange Online. Click next.

Hybrid Configuration Wizard organization configuration transfer

Click on the objects and check what’s different. Look closely and make a decision. We will skip these conflicts and leave them the way they are. Click next.

Hybrid Configuration Wizard organization configuration transfer - review objects

Click update and wait for the Hybrid Configuration Wizard to run.

Hybrid Configuration Wizard ready for update

You can get an error HCW8077 and HCW8092. Click retry.

Hybrid Configuration Wizard configuring errors

Click update.

Hybrid Configuration Wizard rerun update

Congratulations! The Exchange Hybrid Configuration is a success. The hybrid services are now configured between Exchange Online in the Office 365 tenant and the on-premises Exchange environment. Click close.

Hybrid Configuration Wizard congratulations

Verify Hybrid Configuration Wizard installation

Go to Programs and Features and check that there is new software installed.

Hybrid Configuration Wizard programs and features

By default, the hybrid configuration log location is on the on-premises Mailbox server at:

%UserProfile%\AppData\Roaming\Microsoft\Exchange Hybrid Configuration
Hybrid Configuration Wizard AppData logs

You can always rerun the Hybrid Configuration Wizard whenever you make any changes to the environment.

In the next article, we will look at the tools to manage Exchange Hybrid.


In this article, you learned how to download, install and run the Hybrid Configuration Wizard. After running the Hybrid Configuration Wizard, there is a coexistence between the on-premises environment and Exchange Online.

Did you enjoy this article? You may also like HCW8078 – Migration Endpoint could not be created. Don’t forget to follow us and share this article.



ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 3 Comments

  1. When I run the HCW it fails on Register Hybrid Agent. In the log it is telling me this:

    2021.08.18 13:17:44.082 10333 [Client=UX, fn=SendAsync, Thread=12] FINISH Time=543.0ms Results=BadRequest {“error”:{“code”:”InternalUrl_Duplicate”,”message”:”Internal url ‘’ is invalid since it is already in use”,”innerError”:{“date”:”2021-08-18T13:17:44″,”request-id”:”de4f1e8a-f045-4b31-b943-82fd1501805d”,”client-request-id”:”de4f1e8a-f045-4b31-b943-82fd1501805d”}}}
    2021.08.18 13:17:44.084 10407 [Client=UX, Thread=12] Updating Local Client Configuration File
    2021.08.18 13:17:44.107 10341 [Client=UX, Page=HybridConnectorInstall, Step=ConfigOrgRoute, Thread=12] FINISH Time=581.1ms Results=Failed

    What does this mean I have a duplicate URL. Yes my internal and external URL are the same. They are can be. You instructions for setup even show that. Can you tell me what else to look for?

    1. You get the Hybrid Agent registration error because you already have another Enterprise App published with the same URL.

      The best way is to rerun the Hybrid Configuration Wizard and select “Use Exchange Classic Hybrid Topology” instead of the “Use Exchange Modern Hybrid Topology”. This way, you will not get this error.

      1. We are also getting that error. Do you know of a way to check what Enterprise App is published with that same URL? Thanks for your help.

Leave a Reply

Your email address will not be published. Required fields are marked *