Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix HCW8064

HCW8064: the Hybrid Configuration Wizard finishes but OAuth is not set up

11 min read Updated October 4, 2026 Exchange Server

Fix it now

The wizard reached the end of its run and could not complete the OAuth portion. Microsoft’s documented response is short: run the Hybrid Configuration Wizard again, or configure OAuth manually using the published procedure. Before you do either, make sure you are running the current wizard, because an out-of-date one produces a related failure that no amount of rerunning fixes.

Exchange Management Shell on premises, to see what the wizard did and did not create

Get-AuthConfig | Format-List CurrentCertificateThumbprint
Get-AuthServer | Format-List Name,Enabled,IsDefaultAuthorizationEndpoint
Get-IntraOrganizationConnector | Format-List Name,Enabled,TargetAddressDomains
Get-PartnerApplication | Format-List Name,Enabled,ApplicationIdentifier
  1. Install the current Hybrid Configuration Wizard from aka.ms/hybridwizard before rerunning anything. If yours is version 16.x or earlier it does not update itself and has to be uninstalled and reinstalled.
  2. Rerun the wizard. That is the first option Microsoft gives for this warning, and a transient failure during the OAuth step is common enough to be worth one retry.
  3. If it fails again, check the objects above. Missing AuthServer, IntraOrganizationConnector or PartnerApplication objects tell you which part of the OAuth configuration did not land.
  4. Check the auth certificate has not expired: read the thumbprint from Get-AuthConfig, then check its NotAfter with Get-ExchangeCertificate -Thumbprint <value> | Format-List NotAfter.
  5. Test the trust in the direction that matters: Test-OAuthConnectivity -Service EWS -TargetUri <remote EWS URL> -Mailbox <a mailbox>.

Microsoft’s second documented option is to configure OAuth by hand using its published procedure for OAuth authentication between Exchange and Exchange Online. Use that procedure rather than assembling the objects from memory.

If free/busy and cross-premises moves work afterwards, stop here. If the wizard fails at the same step every time, the next section covers what it is trying to do.

Why it happens

Microsoft’s page for this condition quotes the wizard’s own words: the HCW has completed, but was not able to perform the OAuth portion of your hybrid configuration; if you need features that rely on OAuth, you can try running the HCW again or manually configure OAuth using the published steps. The cause it gives is broad – an issue occurred that prevented OAuth from being configured, either transient or permanent. That vagueness is deliberate, and it is why rerunning is the first documented option rather than a shrug.

It matters more than the wording suggests, because the rest of hybrid can look correct while OAuth is broken. Mail flows, the shared namespace works, and then free/busy lookups, cross-premises mailbox moves and the features that depend on server-to-server trust fail quietly, days later, in a way nobody connects back to the wizard run.

The number HCW8064 is worth a note of its own. Microsoft does not publish it: the page that documents this condition does not carry the code at all. The condition is documented, the code is not, and the same is true of HCW8072 and HCW8028 – a search of Microsoft’s documentation for either returns nothing. Use the codes to correlate lines in your own log; do not look for an authoritative meaning that has not been published.

One neighbouring error is fully documented and is worth ruling out first because its fix is trivial. AADSTS50011 – the reply URL specified in the request does not match the reply URLs configured for the application – is caused by one of the wizard’s old reply URLs having been retired while the installed wizard still uses it. The fix is to install the current wizard, and versions 16.x and earlier will not update themselves, so they need uninstalling first.

The installed Hybrid Configuration Wizard is out of date

You have this one if AADSTS50011 in the run, or a sign-in that is rejected before the wizard gets anywhere near your organisation.

  1. Check the wizard’s version. If it is 16.x or earlier it will not update itself.
  2. Uninstall it, then install the current version from aka.ms/hybridwizard.
  3. Run it again from the same server and the same account.
  4. Only then go looking at objects in your own organisation.

Microsoft’s published cause is that an old reply URL the wizard used has been removed from the service and the installed wizard does not know. Nothing in Active Directory or in the tenant needs changing.

The failure was transient

You have this one if The wizard completed with the OAuth warning once, and nothing obvious is wrong.

  1. Run the wizard again. This is the first option Microsoft documents for this warning.
  2. Run it from the same on-premises server and with the same accounts, so you are repeating the run rather than changing it.
  3. Check afterwards that Get-AuthServer, Get-IntraOrganizationConnector and Get-PartnerApplication return the objects you expect.
  4. Test with Test-OAuthConnectivity before deciding it worked.

The on-premises auth certificate has expired

You have this one if The thumbprint from Get-AuthConfig resolves to a certificate whose NotAfter has passed, and other OAuth-dependent features fail at the same time.

  1. Create the replacement with New-ExchangeCertificate, using a self-signed certificate for this internal role.
  2. Stage it: Set-AuthConfig -NewCertificateThumbprint <thumbprint> -NewCertificateEffectiveDate <date>.
  3. Publish it with Set-AuthConfig -PublishCertificate, then clear the old one with Set-AuthConfig -ClearPreviousCertificate.
  4. Restart the Microsoft Exchange Service Host service and IIS, and allow Active Directory replication to reach the other Exchange servers before testing.

This certificate is internal to the organisation and is not the one clients see. Replacing it changes nothing about what a browser trusts.

The account running the wizard cannot do what it is asked

You have this one if The step fails immediately and identically every time, and the log records an authorisation failure rather than a network one.

  1. Run the wizard as an account holding Organization Management on premises.
  2. Sign in to the tenant with an account holding an administrative role sufficient to register applications and change Exchange Online organisation settings.
  3. Check for a conditional access policy blocking the sign-in the wizard performs, and arrange an exclusion for the run rather than weakening the policy permanently.
  4. Rerun and watch whether the same step now proceeds.

The Exchange server cannot reach the identity endpoints

You have this one if The log records a connection or timeout failure while retrieving metadata, and the server has no direct outbound internet access.

  1. Confirm the Exchange server can reach Microsoft’s identity and metadata endpoints over 443, allowing for any proxy in the path.
  2. If a proxy is required, configure it for the server rather than relying on a per-user setting, and confirm it does not strip authentication headers.
  3. Check that TLS inspection is not replacing the certificate those endpoints present, which breaks the trust the wizard is trying to establish.
  4. Retest with Test-OAuthConnectivity before rerunning the wizard.

Full reference

What OAuth carries, and what breaks without it

  • Cross-premises free/busy lookups in both directions.
  • Cross-premises mailbox moves and the tooling that drives them.
  • Features that depend on server-to-server authentication between the on-premises organisation and Exchange Online, rather than on a user’s own credentials.
  • None of these fail at the moment the wizard finishes, which is why an OAuth warning gets dismissed and then investigated a fortnight later as a free/busy problem.

The objects the wizard should have created

Cmdlet What it should show
Get-AuthServer The authorisation server object for the tenant
Get-IntraOrganizationConnector A connector describing the other organisation and the domains it covers
Get-PartnerApplication The partner application registration used for server-to-server authentication
Get-AuthConfig The current auth certificate thumbprint
Test-OAuthConnectivity A successful result for the service and target you name

Read them before you change anything. Which objects are missing tells you where in the sequence the wizard stopped, and that is far more useful than the log line that names the step.

Codes in this family, and what is actually published

Code Published by Microsoft?
AADSTS50011 Yes. The reply URL specified in the request does not match the reply URLs configured for the application. Fix: install the current wizard
HCW8064 No. The condition is documented; the code is not
HCW8072 No. A search of Microsoft’s documentation returns nothing
HCW8028 No. A search of Microsoft’s documentation returns nothing

This is not a reason to ignore the numbers. They are stable within your own wizard log and they let you correlate a failure across runs. It is a reason to distrust any source that tells you exactly what HCW8072 means.

Replacing the auth certificate by hand

  1. New-ExchangeCertificate to create the replacement. This role uses a self-signed certificate, not one from a public authority.
  2. Set-AuthConfig -NewCertificateThumbprint <thumbprint> -NewCertificateEffectiveDate <date> to stage it as the next certificate.
  3. Set-AuthConfig -PublishCertificate to roll it over immediately and deploy it to the Client Access servers.
  4. Set-AuthConfig -ClearPreviousCertificate to clear the certificate saved as the previous one.
  5. Restart the Microsoft Exchange Service Host service and IIS, then allow replication before testing from another Exchange server.

Cleaning up after several failed runs

Removing hybrid objects on a system that is partly working interrupts free/busy and cross-premises operations while you rebuild. Record what exists before you start, remove objects one at a time, and check after each removal rather than sweeping.

  • Inventory both sides before touching either. The on-premises objects are listed above; the tenant has its matching connector.
  • Remove only what clearly belongs to the failed attempt. A partly cleaned hybrid is harder to diagnose than a broken one.
  • Rerun the wizard rather than hand-building the remainder, so both organisations end up describing the same arrangement.
  • Keep a note of what you removed and when, because the next person to look at this will need it.
  • Where the wizard genuinely cannot complete OAuth, use Microsoft’s published manual procedure rather than assembling the objects from memory.

Every code this article covers

Code What it points at Source
HCW8064 Reported when the wizard completes without configuring OAuth. Microsoft documents the condition and its two fixes but does not publish this code not published by the vendor
AADSTS50011 The reply URL specified in the request does not match the reply URLs configured for the application. Caused by an out-of-date Hybrid Configuration Wizard using a retired reply URL Microsoft Learn
HCW8072 A wizard step failure recorded in the same run. Microsoft publishes nothing for this code; read the log line it appears on not published by the vendor
HCW8028 Another wizard step failure recorded in the same run. Microsoft publishes nothing for this code not published by the vendor

Confirm the fix worked

  1. Get-AuthServer, Get-IntraOrganizationConnector and Get-PartnerApplication all return the objects you expect on premises.
  2. Get-AuthConfig returns a thumbprint whose certificate has a NotAfter date in the future.
  3. Test-OAuthConnectivity -Service EWS -TargetUri <uri> -Mailbox <mailbox> succeeds.
  4. A free/busy lookup across the hybrid boundary returns real availability rather than hash marks.
  5. A test mailbox move in the direction you need starts without an authorisation failure.

Questions people ask about this

Does this cost anything to fix?

No. The Hybrid Configuration Wizard is free, the OAuth objects are part of Exchange, and the auth certificate is self-signed. Nothing here is resolved by a purchase.

Is rerunning the wizard safe?

Yes, and it is the first option Microsoft documents for this warning. It writes to both organisations, so record your current connector and organisation relationship settings first, but rerunning is the intended recovery rather than a risk.

What does HCW8064 mean exactly?

Microsoft does not publish the code. It documents the condition it accompanies – the wizard completed without performing the OAuth portion – and gives two fixes: rerun the wizard, or configure OAuth manually using the published procedure.

Why should I update the wizard first?

Because a documented failure in this area is caused by exactly that. AADSTS50011 occurs when a reply URL the wizard used has been retired and the installed version does not know; versions 16.x and earlier do not update themselves and have to be uninstalled and reinstalled.

Can I configure OAuth by hand instead?

Yes. Microsoft publishes a procedure for configuring OAuth authentication between Exchange and Exchange Online organisations, and names it as the alternative to rerunning the wizard. Follow that procedure rather than creating the objects from memory.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix 451 4.4.0 DNS query failed: Exchange cannot resolve the next hop Free Fix TargetUserAlreadyHasPrimaryMailboxException and other stuck move requests Free Fix Event ID 1053: ActiveSync lacks permission to create the device container Free Fix 441 4.4.1 and 471 4.4.1: Exchange cannot hold a connection to the target host
โ† Back to Knowledge Base