HCW fails on intra-organization configuration

o365logoFor my lab, I often have to recreate the Exchange Hybrid configuration for a fresh setup of Exchange On-Premises using formerly used namespaces. Normally you would just run the Exchange Hybrid Configuration Wizard (HCW) after configuring certificates and endpoint URLs. If you don’t clean up the previous configuration information from your tenant upfront, you may then run in the following error message when running the HCW:

Updating hybrid configuration failed with error ‎’Subtask Configure execution failed: Configure IntraOrganization Connector Execution of the Get-IntraOrganizationConfiguration cmdlet has thrown an exception. This may indicate invalid parameters in your hybrid configuration settings. Multiple OnPremises configuration objects were found. Please use the OrganizationGuid parameter to select a specific OnPremises configuration object.

Multiple OnPremises configuration objects indicates there are multiple intra-organization objects defined in your tenant. You can clean up previous intra-organization configuration objects from your tenant as follows:

  1. First, in your Exchange On-Premises environment, run the Get-OrganizationConfig cmdlet from the Exchange Management Shell:
    image
  2. Copy the Guid value, in the example 1a95d446-ff56-4399-a95e-8ab46c30912b.
  3. Connect to Exchange Online (instruction here).
  4. Check the existing On-Premises definitions in your tenant by running Get-OnPremisesOrganization. There should be more than 1 entry.
  5. To remove the orphaned objects, remove all the objects that don’t match the Organization Guid you retrieved from your On-Premises environment earlier, e.g.:Get-OnPremisesOrganization | Where { $_.OrganizationGuid –ne ‘1a95d446-ff56-4399-a95e-8ab46c30912b’ } | Remove-OnPremisesOrganization
    image
  6. Now you could try re-running the HCW immediately, but chances are you will run in another error caused by orphaned intra-organization connectors (IOC). In those cases, when the HCW tries to run New-IntraOrganizationConnector, it will fail as the namespace defined by TargetAddressDomains is already in use by an existing connector, and ‘The domain <domain> already exists in another intra-organization connector’ is reported. Those connectors, named ‘HybridIOC – ’, where GUID is the Guid of previously used organizations, exist in your tenant. In your Exchange Online session, run the following cmdlet to remove orphaned connector definitions:Get-IntraOrganizationConnector | Where { $_.Identity –ne ‘HybridIOC – 1a95d446-ff56-4399-a95e-8ab46c30912b’ } | Remove-IntraOrganizationConnector
    image
  7. While you’re at it, you also might want to remove previously created connectors. Again, in your Exchange Online session, run the following cmdlets to remove orphaned inbound and outbound connectors (again, using the previously noted Organization GUID):
    Get-OutboundConnector | Where { $_.Identity –ne ‘Outbound to 1a95d446-ff56-4399-a95e-8ab46c30912b’ } | Remove-OutboundConnector
    Get-InboundConnector | Where { $_.Identity –ne ‘Inbound from 1a95d446-ff56-4399-a95e-8ab46c30912b’ } | Remove-InboundConnector

After removing these orphaned objects, you should be able to run the HCW succesfully.

7 thoughts on “HCW fails on intra-organization configuration

  1. Hi Micheal, Its a great article.But could you tell me if it applies for our org scenario, as our on premise Exchange 2010 is already in a hybrid setup , but that office365 domain is now moved to another tenant.All our mailboxes are still on premise.

    Regards
    Rini

    • In my lab, I scrap Exchange environments and recreate the Hybrid config with an existing tenant. Transferring (mail) domains from one tenant to another is a different scenario, and requires removing/adding the domain (and a lot can depend on those – eg address policies, mail routing, UPN, etc). In the latter case, the organization (and thus GUID) stays intact; you may need to re-apply the HCW to effectuate the changes in mail domains used, depending on your configuration (eg is that domain used to route mail).

  2. Hi Michel,
    Sorry for reviving an old post, but this one keeps popping up when I search for my error code with the HCW. I am trying to run Full-Hybrid with an Exchange 2016 single server on-premises.

    The HCW keeps failing during the New-IntraOrganizationConnector setup. The error message is:
    PowerShell failed to invoke ‘New-IntraOrganizationConnector’: Cannot bind argument to parameter ‘TargetAddressDomains’ because it is null.
    The command it is trying to execute is:
    New-IntraOrganizationConnector -Name ‘HybridIOC -‘ -DiscoveryEndpoint ‘https://autodiscover-s.outlook.com/autodiscover/autodiscover.svc’ -TargetAddressDomains $null -Enabled: $true
    which obviously doesn’t work because of the $null for TargetAddressDomains. My question is, do you have any idea where the HCW should get the value, and what might cause the fact that it can’t determine the correct value now?
    I have been doing a lot of Troubleshooting with Office365 support, but it looks like they don’t have a clue at the moment. Do you have any ideas?

  3. Hi Michael, I experience the same issue as Marcel.
    Checked IntraOrganizationConfiguration (Get-IntraOrganizationConfiguration | fl) and see empty values for OnlineDiscoveryEndpoint and OnlineTargetAddress.
    Could it be a bug in this version of the HCW?
    As it seems the $null is coded this way?

  4. Hi Richard,

    Today I started the wizard again, and it updated itself to 16.0.2859.5
    And now the wizard ran perfectly. For now, my problem is solved.
    Hopefully the update will fix your problem also.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s