{"id":186,"date":"2019-02-01T00:05:58","date_gmt":"2019-02-01T05:05:58","guid":{"rendered":"http:\/\/itblog.ldlnet.net\/?p=186"},"modified":"2020-03-23T12:49:50","modified_gmt":"2020-03-23T17:49:50","slug":"what-the-hybrid-configuration-wizard-performs-in-the-background-and-configuring-hybrid-co-existence-with-exchange-online","status":"publish","type":"post","link":"https:\/\/itblog.ldlnet.net\/index.php\/2019\/02\/01\/what-the-hybrid-configuration-wizard-performs-in-the-background-and-configuring-hybrid-co-existence-with-exchange-online\/","title":{"rendered":"What the Hybrid Configuration Wizard Performs in the background and configuring Hybrid Co-Existence with Exchange Online"},"content":{"rendered":"\n<h2 class=\"has-medium-pink-color has-text-color has-text-align-center wp-block-heading\">****UPDATE 3\/23\/2020****<\/h2>\n\n\n\n<p>Changes have been made to the HCW and the installation since this original post. Please read the following to gain knowledge of the updates to the tool and the installation.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\"><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/march-2020-significant-update-to-hybrid-configuration-wizard\/ba-p\/1238753\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">March 2020 significant update to Hybrid Configuration Wizard<\/a><\/h3>\n\n\n\n<p>We wanted to let you know that we are releasing what we consider a significant update to Exchange Hybrid Configuration Wizard (HCW). Along with a handful of small bug fixes, there are four major changes coming that we wanted to share with you:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong><em>HCW will no longer enable Federation Trust by default for all installations.<\/em><\/strong> Instead, it will only enable Federation Trust if there are Exchange 2010 servers on premises. HCW will call Get-ExchangeServer and if no Exchange 2010 servers are reported, the workflow to enable Federation Trust and subsequently require domain proof will not execute. Note that organization relationships are still created.<\/li><li>When uninstalling the hybrid agent and switching to Classic in the HCW, this action would sometimes fail with a \u201cnull reference\u201d error. We have fixed this!<\/li><li>How many of you have hit the HCW 8064 error \u2013 unable to configure OAuth, and subsequently had no idea why OAuth failed to configure? Yes, we heard you loud and clear! In this release, we have completely changed the way we enable and configure OAuth. Instead of enabling OAuth at the service layer, we now enable OAuth via a Graph API under the context of the Tenant Admin. This in turn removes the error obfuscation we had with the service layer enablement and allows us to include a detailed error entry in the HCW log. So while you still see the HCW 8064 error in the HCW UI, you can now review the log for the specific error detail which will make it easier to troubleshoot and resolve.<\/li><li>When verifying DNS, we had a fallback mechanism that would reach out to an external site to verify domains. While this fallback mechanism was rarely hit, we received overwhelming feedback to not use this mechanism\/site as it was not listed in our IPs &amp; URLs web page. We have removed that fallback and now only use the endpoint \u201cmshybridservice.trafficmanager.net\u201d, which is listed in&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/office365\/enterprise\/additional-office365-ip-addresses-and-urls\" target=\"_blank\">our endpoints documentation<\/a>.<\/li><\/ol>\n\n\n\n<p>Because this is a major version update, the build begins with 17.x vs 16.x. The build number can be found in the top right corner once you download and open the HCW.<\/p>\n\n\n\n<p>Because of the web-based distribution nature HCW uses and this version is a brand new package, you will get all this goodness simply by installing the new HCW from&nbsp;<a href=\"http:\/\/aka.ms\/hybridwizard\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>. The current builds of HCW (16.x) will not automatically update to 17.x build, in fact \u2013 you could run the two side-by-side. Once you are on 17.x build \u2013 the HCW will then auto-update as usual.<\/p>\n\n\n\n<p class=\"has-background has-small-font-size has-light-gray-background-color\">A few additional notes: At this time, we do not anticipate new HCW 16.x builds. Therefore, to continue getting new HCW builds in the future, uninstall the current version of HCW (16.x) and then install the new version (17.x). The new version of HCW has a new dependency, .NET 4.7.2. The installer should take care of this for you, but just so you are aware.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<h3 class=\"has-text-align-center wp-block-heading\"><strong>ORIGINAL POST<\/strong><\/h3>\n\n\n\n<p>I&#8217;m working on getting certified in Exchange Hybrid Scenarios and Exchange Online configuration as part of my skill set for Exchange. In doing so, I had successfully implemented a complete Full Hybrid Exchange Environment between my Exchange Online Tenant and my On Premises Exchange 2019 Environment last evening. <\/p>\n\n\n\n<p>I wanted to give an update that was posted to my LinkedIn Posting on this. Thank you <strong>Brian Day<\/strong> for the vote of confidence and caution that running these cmdlets manually is not supported by Microsoft and that the HCW, like all the Online Microsoft Products, is constantly changing and being updated.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/02\/Brian_Day_Comment.jpg\" alt=\"\" class=\"wp-image-231\" width=\"650\" height=\"133\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/02\/Brian_Day_Comment.jpg 531w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/02\/Brian_Day_Comment-300x62.jpg 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><figcaption>Important Note<\/figcaption><\/figure><\/div>\n\n\n\n<p>As preparation, I bought some Exchange Online Plan 1 licenses which give me a 50 GB mailbox limit and basic mailbox functionality. It does not include the more advanced features such as ATP, or DLP. I am running most of those features through my On Premises Environment. I mainly wanted to be able to place mailboxes in the cloud and have a hybrid setup. My plan was to have mail flow continue through my On Premises environment so that my Exchange Server features would be used and I would not have to change any MX or SPF records. I also had my certificates in place for SSL and OWA so I would want keep mail flow routed that way, through on premises. I do want to be able to have Free\/Busy lookups cross-premise so federation would have to be enabled as well. I would also have to enable the MRS proxy on my Exchange Server so that mailbox migration could be implemented cross-premise. I also have previously configured Azure AD Sync along with ADFS for Single Sign On. In my case, another server was not needed as I didn&#8217;t have enough mailboxes or real need to split my frontend and backend deployment. Running the Hybrid Configuration Wizard would not open any new ports or change any existing port traffic that was already configured on my firewall. These are just a few of the considerations that need to be looked at when considering a hybrid integration.<\/p>\n\n\n\n<p class=\"has-text-align-center has-small-font-size\">Here is a great article to read for the prerequisites <br><strong><em><a aria-label=\"Exchange Hybrid Deployment Prerequisites (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/exchange\/hybrid-deployment-prerequisites\" target=\"_blank\" rel=\"noreferrer noopener\">Exchange Hybrid Deployment Pre-requisites<\/a><\/em><\/strong><\/p>\n\n\n\n<p>So, once I had all those considerations handled in my design, I ran the Hybrid Configuration Wizard. What I want to do in this blog post is to go through the steps that the wizard does in the background to setup the Hybrid Environment as you go through the Wizard.<\/p>\n\n\n\n<p>I mainly used the following blog post as a reference, but have approached it differently by diving into the cmdlets that are run during the process:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-exchange-amp-office-365-admin-039-s-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.codetwo.com\/admins-blog\/office-365-hybrid-configuration-wizard-step-by-step\/#validating-connection\n<\/div><\/figure>\n\n\n\n<p class=\"has-small-font-size\"><strong>1.&nbsp;The HCW validates the On-premises and Online Exchange Connection.<\/strong><br><br>The Hybrid Configuration Wizard checks if it is possible to connect to both servers with PowerShell.  It runs the Get-ExchangeServer cmdlet on premises after resolving the server in DNS. It then connects to Exchange Online, authorizing the connection:<br><br><strong>Authority=https:\/\/login.windows.net\/common Resource=https:\/\/outlook.office365.com ClientId=abcdefgh-a123-4566-9abc-2bdflancelin<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size\"><strong>2. The HCW collects data about Exchange configuration from the on-premises Active Directory<\/strong><br> <br>The Wizard gathers information about the local domain. In order to do that, the HCW executes a series of  cmdlets. <br><br>These include, in order:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-MailboxDatabase -IncludePreExchange2013: $true\n\nGet-OrganizationConfig\n\nGet-HybridConfiguration\n\nGet-AcceptedDomain\n\nGet-FederatedOrganizationIdentifier -IncludeExtendedDomainInfo: $false\n\nGet-FederationTrust\n\nGet-WebServicesVirtualDirectory -ADPropertiesOnly: $true\n\nGet-RemoteDomain<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>3. <\/strong> <strong>The HCW collects information on the Exchange online (Office 365) configuration<\/strong><br> <br>This task repeats what has been done in the previous step, only for the Exchange online, instead of the on-premises one. <br><br>The cmdlets include, in order:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-OrganizationConfig\n\nGet-OnPremisesOrganization\n\nGet-AcceptedDomain\n\nGet-MigrationEndpoint<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>4. <\/strong> <strong>Federation Trust is determined. If not present, a new Federation Trust and the required certificate will be created on the local Exchange&nbsp;Server<\/strong><br><br>You will be prompted in the Wizard to create a Federation Trust if not present. The following articles explain Federation and its requirements:<br><br><strong><em>Understanding Federation &#8211;&nbsp;<\/em><\/strong><a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd335047(v=exchg.141).aspx\"><strong><em>Link Here<\/em><\/strong><\/a><strong><em><br>Understanding Federated Delegation &#8211;&nbsp;<\/em><\/strong><a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd638083(v=exchg.141).aspx\"><strong><em>Link Here<\/em><\/strong><\/a><strong><em><br>Create a Federation Trust &#8211;&nbsp;<\/em><\/strong><a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd335198(v=exchg.141).aspx\"><strong><em>Link Here<\/em><\/strong><\/a><br> <br>If the activity is finished successfully, a new certificate should appear on the on-premises Exchange Certificates list. The new certificate includes \u201cFederation\u201d in its Subject field. To make sure the certificate is there, you can run a cmdlet: Get-ExchangeCertificate | ft -a -wr<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"822\" height=\"172\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ExchangeCertificateList.png\" alt=\"\" class=\"wp-image-187\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ExchangeCertificateList.png 822w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ExchangeCertificateList-300x63.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/01\/ExchangeCertificateList-768x161.png 768w\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" \/><figcaption> <br><strong>The results will look like this<\/strong><br><\/figcaption><\/figure>\n\n\n\n<p class=\"has-small-font-size\"><strong>5.&nbsp;The&nbsp;HCW creates<\/strong> <strong>a new Hybrid Configuration Object in the local Active Directory<\/strong><br><br>The HCW will run cmdlets based on the information you provide in the HCW for the certificate, the on premises Exchange Server, the domain(s), and what features you want turned on:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">New-HybridConfiguration -Name 'Hybrid Configuration'\n\nSet-HybridConfiguration -ClientAccessServers $null -ExternalIPAddresses $null -Domains 'ldlnet.net' -OnPremisesSmartHost 'mail.ldlnet.net' -TLSCertificateName 'CN=Go Daddy Secure Certificate Authority - G2, OU=http:\/\/certs.godaddy.com\/repository\/, O=\"GoDaddy.com, Inc.\", L=Scottsdale, S=Arizona, C=USCN=mail.ldlnet.net, OU=Domain Control Validated' -SendingTransportServers EX01 -ReceivingTransportServers EX01 -EdgeTransportServers $null -Features FreeBusy,MoveMailbox,Mailtips,MessageTracking,OwaRedirection,OnlineArchive,SecureMail,CentralizedTransport,Photos\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\">It then checks the settings through the following cmdlets:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-OrganizationConfig\n\nGet-AcceptedDomain\n\nGet-RemoteDomain<\/pre>\n\n\n\n<p class=\"has-small-font-size\">It then enables Organization Customization for both environments through this cmdlet:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Enable-OrganizationCustomization\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>6.&nbsp;Configuration&nbsp;is&nbsp;then&nbsp;completed&nbsp;to&nbsp;modify&nbsp;the&nbsp;settings&nbsp;on&nbsp;the on premises  Exchange&nbsp;environment&nbsp;<\/strong><br><br>EmailAddressPolicy \u2013 HCW adds address @tenant.mail.onmicrosoft.com<br>The HCW configures remote domains \u2013 adds&nbsp;<strong>tenant.mail.onmicrosoft.com<\/strong>&nbsp;and&nbsp;<strong>tenant.onmicrosoft.com<\/strong><br>The HCW adds a new accepted domain \u2013 adds&nbsp;<strong>tenant.mail.onmicrosoft.com<\/strong><br><br>Some of the cmdlets run:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Set-EmailAddressPolicy -Identity 'ldlnet.net' -ForceUpgrade: $true -EnabledEmailAddressTemplates 'smtp:%1g%s@ldlnet.net','SMTP:%g.%s@ldlnet.net','smtp:%m@LDLNET.mail.onmicrosoft.com'\n\nUpdate-EmailAddressPolicy -Identity 'ldlnet.net' -UpdateSecondaryAddressesOnly: $true\n\nNew-RemoteDomain -Name 'Hybrid Domain - LDLNET.mail.onmicrosoft.com' -DomainName 'LDLNET.mail.onmicrosoft.com'\n\nSet-RemoteDomain -TargetDeliveryDomain: $true -Identity 'Hybrid Domain - LDLNET.mail.onmicrosoft.com'\n\nNew-RemoteDomain -Name 'Hybrid Domain - LDLNET.onmicrosoft.com' -DomainName \n'LDLNET.onmicrosoft.com'\n\nSet-RemoteDomain -TrustedMailInboundEnabled: $true -Identity 'Hybrid Domain - LDLNET.onmicrosoft.com'\n\nNew-AcceptedDomain -DomainName 'LDLNET.mail.onmicrosoft.com' -Name 'LDLNET.mail.onmicrosoft.com'\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>7. The HCW Configures the Organization Relationship between the local server and the cloud.<\/strong><br><br>This configuration is not necessary in minimal hybrid deployment. Since I have a full hybrid deployment configured, the cmdlets were run as needed to configure it. Thanks to the correct configuration, it is possible to synchronize free\/busy status of mailboxes and their elements between the on-premises Exchange Environment and Exchange online.&nbsp; <br><br>Some of the cmdlets run in the process:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-FederationTrust\n\nGet-FederatedOrganizationIdentifier -IncludeExtendedDomainInfo: $false\n\nGet-FederationInformation -DomainName 'LDLNET.mail.onmicrosoft.com' -BypassAdditionalDomainValidation: $true\n\nGet-OrganizationConfig\n\nGet-OrganizationRelationship\n\nSet-FederatedOrganizationIdentifier -DefaultDomain 'LDLNET.mail.onmicrosoft.com' -Enabled: $true\n\nNew-OrganizationRelationship -Name 'On-premises to O365 - 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -TargetApplicationUri 'outlook.com' -TargetAutodiscoverEpr 'https:\/\/autodiscover-s.outlook.com\/autodiscover\/autodiscover.svc\/WSSecurity' -Enabled: $true -DomainNames 'LDLNET.mail.onmicrosoft.com'\n\nNew-OrganizationRelationship -Name 'O365 to On-premises - 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -TargetApplicationUri 'FYDIBOHF25SPDLT.ldlnet.net' -TargetAutodiscoverEpr 'https:\/\/autodiscover.ldlnet.net\/autodiscover\/autodiscover.svc\/WSSecurity' -Enabled: $true -DomainNames 'ldlnet.net'\n\nSet-OrganizationRelationship -MailboxMoveEnabled: $true -FreeBusyAccessEnabled: $true -FreeBusyAccessLevel LimitedDetails -ArchiveAccessEnabled: $true -MailTipsAccessEnabled: $true -MailTipsAccessLevel All -DeliveryReportEnabled: $true -PhotosEnabled: $true -TargetOwaURL 'http:\/\/outlook.com\/owa\/LDLNET.onmicrosoft.com' -Identity 'On-premises to O365 - 48e7bec9-404c-4d24-b59e-4b46b64d7e03'\n\nSet-OrganizationRelationship -FreeBusyAccessEnabled: $true -FreeBusyAccessLevel LimitedDetails -MailTipsAccessEnabled: $true -MailTipsAccessLevel All -DeliveryReportEnabled: $true -PhotosEnabled: $true -TargetOwaURL 'https:\/\/mail.ldlnet.net\/owa' -Identity 'O365 to On-premises - 48e7bec9-404c-4d24-b59e-4b46b64d7e03'\n\nAdd-AvailabilityAddressSpace -ForestName 'LDLNET.mail.onmicrosoft.com' -AccessMethod InternalProxy -UseServiceAccount: $true -ProxyUrl 'https:\/\/mail.ldlnet.net\/EWS\/Exchange.asmx'\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>8. The HCW and setting connectors on both Exchange servers<br><\/strong> <br>The HCW checks to see if the connectors are there, if not, it sets them up. During this workflow, four connectors are set \u2013 one receive and one send connector for each server. Those connectors guarantee the mail flow between the on-premises and Exchange Online. <br><br>Some of the cmdlets run in the process: <\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Set-HybridConfiguration -ClientAccessServers $null -ExternalIPAddresses $null\n\nNew-SendConnector -Name 'Outbound to Office 365' -AddressSpaces 'smtp:LDLNET.mail.onmicrosoft.com;1' -DNSRoutingEnabled: $true -ErrorPolicies Default -Fqdn 'mail.ldlnet.net' -RequireTLS: $true -IgnoreSTARTTLS: $false -SourceTransportServers EX2019 -SmartHosts $null -TLSAuthLevel DomainValidation -DomainSecureEnabled: $false -TLSDomain 'mail.protection.outlook.com' -CloudServicesMailEnabled: $true -TLSCertificateName 'CN=Go Daddy Secure Certificate Authority - G2, OU=http:\/\/certs.godaddy.com\/repository\/, O=\"GoDaddy.com, Inc.\", L=Scottsdale, S=Arizona, C=USCN=mail.ldlnet.net, OU=Domain Control Validated'\n\nSet-ReceiveConnector -AuthMechanism 'Tls, Integrated, BasicAuth, BasicAuthRequireTLS, ExchangeServer' -Bindings '[::]:25','0.0.0.0:25' -Fqdn 'EX2019.ldlnet.local' -PermissionGroups 'AnonymousUsers, ExchangeServers, ExchangeLegacyServers' -RemoteIPRanges '::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff','0.0.0.0-255.255.255.255' -RequireTLS: $false -TLSDomainCapabilities 'mail.protection.outlook.com:AcceptCloudServicesMail' -TLSCertificateName 'CN=Go Daddy Secure Certificate Authority - G2, OU=http:\/\/certs.godaddy.com\/repository\/, O=\"GoDaddy.com, Inc.\", L=Scottsdale, S=Arizona, C=USCN=mail.ldlnet.net, OU=Domain Control Validated' -TransportRole FrontendTransport -Identity 'EX2019\\Default Frontend EX2019'\n\nNew-InboundConnector -Name 'Inbound from 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -CloudServicesMailEnabled: $true -ConnectorSource HybridWizard -ConnectorType OnPremises -RequireTLS: $true -SenderDomains '' -SenderIPAddresses $null -RestrictDomainsToIPAddresses: $false -TLSSenderCertificateName '.ldlnet.net' -AssociatedAcceptedDomains $null\n\nNew-OutboundConnector -Name 'Outbound to 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -RecipientDomains '*' -SmartHosts 'mail.ldlnet.net' -ConnectorSource HybridWizard -ConnectorType OnPremises -TLSSettings DomainValidation -TLSDomain 'mail.ldlnet.net' -CloudServicesMailEnabled: $true -RouteAllMessagesViaOnPremises: $true -UseMxRecord: $false -IsTransportRuleScoped: $false<\/pre>\n\n\n\n<p class=\"has-small-font-size\">The Intra-Organization is set as well:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-IntraOrganizationConfiguration -OrganizationGuid '48e7bec9-404c-4d24-b59e-4b46b64d7e03'\n\nNew-IntraOrganizationConnector -Name 'HybridIOC - 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -DiscoveryEndpoint 'https:\/\/autodiscover-s.outlook.com\/autodiscover\/autodiscover.svc' -TargetAddressDomains 'LDLNET.mail.onmicrosoft.com' -Enabled: $true\n\nNew-IntraOrganizationConnector -Name 'HybridIOC - 48e7bec9-404c-4d24-b59e-4b46b64d7e03' -DiscoveryEndpoint 'https:\/\/mail.ldlnet.net\/autodiscover\/autodiscover.svc' -TargetAddressDomains 'ldlnet.net' -Enabled: $true<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>9. The HCW configures OAuth Authentication across the Hybrid<\/strong><br><br>This <strong><em><a aria-label=\"LINK (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/exchange\/configure-oauth-authentication-between-exchange-and-exchange-online-organizations-exchange-2013-help\" target=\"_blank\" rel=\"noreferrer noopener\">LINK<\/a><\/em><\/strong><em>&nbsp;<\/em>explains how OAuth is configured between Exchange On Premises and Exchange Online. It&#8217;s a very good article to read as it shows how to get the Modern Authentication style working. Now the HCW does this for you and at the end of the article, you can run cmdlets to test the validity of the configuration. <br><br>If you want to go into a deep dive about how the Hybrid Authentication works, see the following:<br><em><strong><a aria-label=\"Deep Dive&nbsp;Into&nbsp;Hybrid&nbsp;Authentication&nbsp;-&nbsp;from&nbsp;the&nbsp;MS Exchange&nbsp;Team&nbsp;Blog (opens in a new tab)\" href=\"https:\/\/blogs.technet.microsoft.com\/exchange\/2017\/05\/24\/deep-dive-how-hybrid-authentication-really-works\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deep Dive&nbsp;Into&nbsp;Hybrid&nbsp;Authentication&nbsp;&#8211;&nbsp;from&nbsp;the&nbsp;MS Exchange&nbsp;Team&nbsp;Blog<\/a><\/strong><\/em><br><br>Here are some of cmdlets run during this process workflow:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-AuthConfig\n\nGet-ExchangeCertificate -Thumbprint F6C56C57EA7C86C3963FXXXXXXXXXXXXXXXXXXX\n\nGet-ActiveSyncVirtualDirectory -ADPropertiesOnly: $true\n\nGet-PartnerApplication -Identity 'Exchange Online'\n\nSet-PartnerApplication -Identity 'Exchange Online' -Enabled: $true\n\nNew-AuthServer -Name ACS -AuthMetadataUrl 'https:\/\/accounts.accesscontrol.windows.net\/663cad0b-70f7-42a5-b411-9d63337f0130\/metadata\/json\/1'\n\nGet-AuthServer\n\nNew-AuthServer -Name EvoSts -AuthMetadataUrl 'https:\/\/login.windows.net\/LDLNET.onmicrosoft.com\/federationmetadata\/2007-06\/federationmetadata.xml' -Type AzureAD<\/pre>\n\n\n\n<p class=\"has-small-font-size\">Again, look at both of those links to get a little more detail as to what each cmdlet does and how it sets up OAuth. Here are the two cmdlets used to test OAuth:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\" title=\"Run On Premises PowerShell to test OAuth to Exchange Online\">Test-OAuthConnectivity -Service EWS -TargetUri https:\/\/outlook.office365.com\/ews\/exchange.asmx -Mailbox onprem@ldlnet.net -Verbose | fl<\/pre>\n<pre class=\"lang:Powershell nums:false\" title=\"Run Exchange Online PowerShell to test OAuth to On Premises\">Test-OAuthConnectivity -Service EWS -TargetUri https:\/\/mail.ldlnet.net\/metadata\/json\/1 -Mailbox ExOnlineMbx@ldlnet.net -Verbose | fl\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>10.&nbsp;Enable&nbsp;MRS Proxy&nbsp;for&nbsp;Migration<\/strong><br><br>In order to be able to move mailboxes between Exchange On Premises and Exchange Online, you have to enable the Exchange Web Services Virtual Directory to use the MRSProxy (Microsoft Replication Service proxy). You also have to set your EWS Virtual Directory to use Basic Authentication. You&#8217;ll want to do this before running the HCW or else you will receive the following error when the HCW validates the Migration setup and configuration:<\/p>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\">Microsoft.Exchange.Migration.MigrationServerConnectionFailedException: The connection to the server &#8216;mail.ldlnet.net&#8217; could not be completed. &#8212;&gt; Microsoft.Exchange.MailboxReplicationService.RemoteTransientException: The call to &#8216;https:\/\/mail.ldlnet.net\/EWS\/mrsproxy.svc&#8217; failed. Error details: The HTTP request was forbidden with client authentication scheme &#8216;Negotiate&#8217;. &#8211;&gt; The remote server returned an error: (403) Forbidden.. &#8212;&gt; Microsoft.Exchange.MailboxReplicationService.RemotePermanentException: The HTTP request was forbidden with client authentication scheme &#8216;Negotiate&#8217;. &#8212;&gt; Microsoft.Exchange.MailboxReplicationService.RemotePermanentException: The remote server returned an error: (403) Forbidden.<br><\/p>\n\n\n\n<p class=\"has-small-font-size\">Some of the cmdlets run to test Migration and MRS Proxy Settings are as follows:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Test-MigrationServerAvailability -ExchangeRemoteMove: $true -RemoteServer 'mail.ldlnet.net' -Credentials (Get-Credential -UserName DOMAIN\\MigrationAdminAccount)\n\n Get-MigrationEndpoint \n\nNew-MigrationEndpoint -Name 'Hybrid Migration Endpoint - EWS (Default Web Site)' -ExchangeRemoteMove: $true -RemoteServer 'mail.ldlnet.net' -Credentials (Get-Credential -UserName  \nDOMAIN\\MigrationAdminAccount)\n\nGet-WebServicesVirtualDirectory -ADPropertiesOnly: $true\ufeff<\/pre>\n\n\n\n<p class=\"has-small-font-size\"><strong>11. Final HCW Configuration and cleanup.<\/strong><br><br>The HCW runs from final cmdlets to finish up the installation of the Hybrid environment. Here are the cmdlets run:<\/p>\n\n\n<pre class=\"lang:Powershell nums:false\">Get-OnPremisesOrganization\n\nSet-OnPremisesOrganization -Identity '48e7bec9-404c-4d24-b59e-4b46b64d7e03' -Comment 'Bunch of letters and numbers'\ufeff<\/pre>\n\n\n\n<p class=\"has-text-align-center has-small-font-size\"><strong>All this information was found in the setup logs that are in the following directory<\/strong><br>C:\\Users\\%username%\\AppData\\Roaming\\Microsoft\\Exchange Hybrid Configuration<\/p>\n\n\n\n<p class=\"has-small-font-size\"><strong>REFERENCES<\/strong><br><a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd335047(v=exchg.141).aspx\"><em>Understanding Federation<\/em><\/a><em><br><\/em><a aria-label=\"Understanding Federated Delegation (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd638083(v=exchg.141).aspx\" target=\"_blank\"><em>Understanding Federated Delegation<\/em><\/a><em><br><\/em><a aria-label=\"Create a Federation Trust (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/technet.microsoft.com\/en-us\/library\/dd335198(v=exchg.141).aspx\" target=\"_blank\"><em>Create a Federation Trust<\/em><\/a><em><br><\/em><a aria-label=\"Hybrid deployment prerequisites (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/technet.microsoft.com\/en-us\/library\/hh534377(v=exchg.160).aspx\ufeff\" target=\"_blank\"><em>Hybrid deployment prerequisites<\/em><\/a><em><br><\/em><a aria-label=\"Exchange Specific OAuth 2.0 Protocol Specification (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/hh745374(v=exchg.80).aspx\" target=\"_blank\"><em>Exchange Specific OAuth 2.0 Protocol Specification<\/em><\/a><em><br><\/em><a aria-label=\"Understanding WS-Security (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/ms977327.aspx\ufeff\" target=\"_blank\"><em>Understanding WS-Security<\/em><\/a><em> <br><\/em><a aria-label=\"JSON Web Tokens (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/datatracker.ietf.org\/doc\/rfc7519\/?include_text=1\" target=\"_blank\"><em>JSON Web Tokens<\/em><\/a><em> <br><\/em><a aria-label=\"Using OAuth2 to access Calendar, Contact and Mail API in Office 365 Exchange Online (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/blogs.msdn.microsoft.com\/exchangedev\/2014\/03\/25\/using-oauth2-to-access-calendar-contact-and-mail-api-in-office-365-exchange-online\/\ufeff\" target=\"_blank\"><em>Using OAuth2 to access Calendar, Contact and Mail API in Office 365 Exchange Online<\/em><\/a><em><br><\/em><a aria-label=\"Configurable token lifetimes in Azure Active Directory (Public Preview) (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/active-directory-configurable-token-lifetimes\" target=\"_blank\"><em>Configurable token lifetimes in Azure Active Directory (Public Preview)<\/em><\/a><em><br><\/em><a aria-label=\"OAuth Troubleshooting (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/blogs.technet.microsoft.com\/exovoice\/2016\/02\/12\/oauth-troubleshooting\ufeff\" target=\"_blank\"><em>OAuth Troubleshooting<\/em><\/a><em><br><\/em><a aria-label=\"Principles of Token Validation (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"http:\/\/www.cloudidentity.com\/blog\/2014\/03\/03\/principles-of-token-validation\" target=\"_blank\"><em>Principles of Token Validation<\/em><\/a><em><br><\/em><a aria-label=\"Troubleshooting free\/busy issues in Exchange hybrid environment (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/support.microsoft.com\/en-us\/help\/10092\/troubleshooting-free-busy-issues-in-exchange-hybrid-environment\" target=\"_blank\"><em>Troubleshooting free\/busy issues in Exchange hybrid environment<\/em><\/a><br><em><a aria-label=\"How to configure Exchange Server on-premises to use Hybrid Modern Authentication (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/office365\/enterprise\/configure-exchange-server-for-hybrid-modern-authentication\" target=\"_blank\">How to configure Exchange Server on-premises to use Hybrid Modern Authentication<\/a><\/em><br><em><a aria-label=\"Microsoft 365 Messaging Administrator Certification Transition (beta) (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/www.microsoft.com\/en-us\/learning\/exam-ms-202.aspx\" target=\"_blank\">Microsoft 365 Messaging Administrator Certification Transition (beta)<\/a><\/em><br><em><a aria-label=\"Microsoft 365 certification exams (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/www.microsoft.com\/en-us\/learning\/microsoft-365-exams.aspx\" target=\"_blank\">Microsoft 365 certification exams<\/a><\/em><br><em><a aria-label=\"Exchange Server build numbers and release dates (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/exchange\/new-features\/build-numbers-and-release-dates?view=exchserver-2019\" target=\"_blank\">Exchange Server build numbers and release dates<\/a><\/em><br><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/march-2020-significant-update-to-hybrid-configuration-wizard\/ba-p\/1238753\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"March 2020 Updates to the HCW (opens in a new tab)\"><em>March 2020 Updates to the HCW<\/em><\/a><\/p>\n\n\n\n<p style=\"background-color:#21a5de\" class=\"has-background has-text-align-center has-large-font-size\"><strong>PLEASE LEAVE QUESTIONS, COMMENTS, UPDATES! I WOULD LOVE TO HEAR FROM YOU!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>****UPDATE 3\/23\/2020**** Changes have been made to the HCW and the installation since this original post. Please read the following to gain<\/p>\n<p class=\"link-more\"><a class=\"myButt \" href=\"https:\/\/itblog.ldlnet.net\/index.php\/2019\/02\/01\/what-the-hybrid-configuration-wizard-performs-in-the-background-and-configuring-hybrid-co-existence-with-exchange-online\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":161,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2,3,16],"tags":[82,27,81,15,75,9,78,73,76,72,71,80,74,77,83,8,13,79],"class_list":["post-186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-general","category-powershell","category-windows","tag-administrator","tag-certificates","tag-certification","tag-cmdlet","tag-dauth","tag-exchange","tag-exchange-onlilne","tag-federation","tag-free-busy","tag-hcw","tag-hybrid","tag-json","tag-oauth","tag-office365","tag-on-premises","tag-powershell","tag-script","tag-trust","odd"],"_links":{"self":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":8,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/186\/revisions\/709"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media\/161"}],"wp:attachment":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}