{"id":8281,"date":"2023-12-08T00:12:58","date_gmt":"2023-12-08T00:12:58","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/a-comprehensive-guide-to-migrating-microsoft-entra-connect-azure-ad-connect-to-a-new-server\/"},"modified":"2025-01-16T11:09:52","modified_gmt":"2025-01-16T11:09:52","slug":"a-comprehensive-guide-to-migrating-microsoft-entra-connect-azure-ad-connect-to-a-new-server","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/a-comprehensive-guide-to-migrating-microsoft-entra-connect-azure-ad-connect-to-a-new-server\/","title":{"rendered":"A Comprehensive Guide to Migrating Microsoft Entra Connect (Azure AD Connect) to a New Server"},"content":{"rendered":"<p><div>Microsoft Entra Connect, formerly named Azure AD Connect, is an on-premises application used to synchronize your local Active Directory objects to Microsoft Entra ID, also known as Azure AD. This post will guide you through the process of migrating Microsoft Entra Connect to a new server.<\/div>\n<\/p>\n<p><p>As you may be aware, Microsoft has recently rebranded Azure Active Directory to Microsoft Entra ID. This change may cause confusion in some cases, particularly with the Microsoft Entra Connect tool. Although the <a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity\/hybrid\/connect\/how-to-connect-install-roadmap\" rel=\"nofollow noopener\" target=\"_blank\">documentation<\/a> already refers to it as Microsoft Entra Connect, the <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=47594\" rel=\"nofollow noopener\" target=\"_blank\">download page<\/a> still refers to it as Azure AD Connect V2. Furthermore, the application itself is still labeled Azure AD Connect. For the sake of consistency, I will refer to it as Azure AD Connect or simply AD Connect throughout this post.<\/p>\n<\/p>\n<p><p>AD Connect is a tool used for hybrid identity deployments and synchronization of your local Active Directory objects to the cloud. In smaller environments, the tool is typically installed on a domain controller, but it can also be installed on different servers. There can be only one active AD Connect server synchronizing the objects in your environment. When you need to upgrade or decommission the server running AD Connect, you need to migrate it. You can also use this process to upgrade AD Connect to a higher version. Microsoft calls this <a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity\/hybrid\/connect\/how-to-upgrade-previous-version\" rel=\"nofollow noopener\" target=\"_blank\">swing migration<\/a>.<\/p>\n<\/p>\n<p><p>The current version of Azure AD Connect V2 requires at least Windows Server 2016. In this guide, I am installing it on a Windows Server 2022 domain controller.<\/p>\n<\/p>\n<p><h2>Export current configuration<\/h2>\n<\/p>\n<p><p>The first step is to export the configuration from the current server. Open AD Connect, click <em>Configure,<\/em> and select <em>View or export current configuration<\/em>.<\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Export-current-configuration.png\" rel=\"nofollow noopener\" target=\"_blank\">Export current configuration<\/a><\/p>\n<p><p>Click the <em>Export Settings<\/em> button to save the result file, ideally directly to the new server or a network share.<\/p>\n<\/p>\n<p><p><strong><em>Note:<\/em><\/strong> Make a note of the account name that is shown. You might need this information later during the cleanup phase.<\/p>\n<\/p>\n<p><p>Next, check the current user sign-in settings (this is not part of the export). To do so, click <em>Previous<\/em> and then select <em>Change user sign-in<\/em>. Make a note or take a screenshot of the settings.<\/p>\n<\/p>\n<p><p>Note that not everything is stored in the exported file, such as custom sync rules. These must be migrated manually. More information can be found <a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity\/hybrid\/connect\/how-to-upgrade-previous-version\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>.<\/p>\n<\/p>\n<p><h2>Install Azure AD Connect on a new server<\/h2>\n<\/p>\n<p><p>If you haven&#8217;t done so yet, now is the time to <a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=47594\" rel=\"nofollow noopener\" target=\"_blank\">download<\/a> Azure AD Connect. Once done, run the MSI package to get started. First, you need to accept the license terms. Next, click <em>Customize <\/em>on the Express Settings screen. Select the <em>Import synchronization settings<\/em> checkbox and provide a path to the exported JSON file.<\/p>\n<\/p>\n<p><p>Click <em>Install <\/em>to get to the User Sign-in settings. Select the same settings that you noted from the current server. In my case, it was Password Hash Synchronization only, and click <em>Next. <\/em>On the <em>Connect to Azure AD<\/em> screen, enter your Azure account with at least the <strong>Hybrid Identity Administrator<\/strong> user role, and click <em>Next.<\/em><\/p>\n<\/p>\n<p><div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Enter-Azure-AD-credentials.png\" rel=\"nofollow noopener\" target=\"_blank\">Enter Azure AD credentials<\/a><\/div>\n<\/p>\n<p><p>On the <em>Connect your directories<\/em> screen, first select the forest to synchronize.<\/p>\n<\/p>\n<p><div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Connect-your-directories.png\" rel=\"nofollow noopener\" target=\"_blank\">Connect your directories<\/a><\/div>\n<\/p>\n<p><p>As you can see, I have a red x next to the domain name. This is because I must specify an account that AD Connect should use to read Active Directory. Click <em>Change Credentials. <\/em>There are two options: let AD Connect create a new account or use an existing account with the required permissions. In my case, I let the tool create an account for me. The account name is in the format MSOL_XXXXXXXX.<\/p>\n<\/p>\n<p><div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Create-an-AD-Connect-sync-account.png\" rel=\"nofollow noopener\" target=\"_blank\">Create an AD Connect sync account<\/a><\/div>\n<\/p>\n<p><p>Once you configure the AD account, the mark next to the domain name will turn green, and you can click <em>Next<\/em> to review the configuration. There are two checkboxes on the <em>Ready to configure<\/em> screen. The first starts the synchronization process once the wizard is completed. Pay close attention to the <em>Enable staging mode\u2026<\/em> checkbox and make sure it&#8217;s checked. As already mentioned, only one AD Connect server can actively sync the changes at any time, so the server you are currently installing must go to staging mode. Staging mode prevents the server from syncing any local changes back to the cloud.<\/p>\n<\/p>\n<p><div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Ready-to-configure-2.png\" rel=\"nofollow noopener\" target=\"_blank\">Ready to configure<\/a><\/div>\n<\/p>\n<p><p>Click <em>Install<\/em> to complete the wizard. It will take several minutes to do so.<\/p>\n<\/p>\n<p><div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Configuration-complete.png\" rel=\"nofollow noopener\" target=\"_blank\">Configuration complete<\/a><\/div>\n<\/p>\n<p><p>The wizard also suggests checking the imported configuration against the exported configuration. You can do so using your favorite text editor, for example, Notepad++. Note that small differences in the JSON file are expected, such as the AD Connect version number, new server hostname, new username, etc.<\/p>\n<\/p>\n<p><p><em><strong>Note:<\/strong> If you had any custom synchronization rules defined, make sure to create them again on the new server.<\/em><\/p>\n<\/p>\n<p><h2>Verify synchronization results<\/h2>\n<\/p>\n<p><p>Once the tool itself is installed, you need to verify that the synchronization works properly. Remember the two checkboxes on the <em>Ready to configure<\/em> screen? The first was to <em>Start the synchronization process when the configuration completes<\/em>. If you have left it checked, the tool will immediately sync. To check the results, run the Synchronization service from the Start menu. Here, you can see that a full import and sync was done successfully.<\/p>\n<\/p>\n<p><p>Initial synchronization results<\/p>\n<\/p>\n<p><p><em><strong>Note:<\/strong> If you want to see exactly which objects (users, groups, etc.) the server will synchronize, you can create an Excel export from the AD Connect tool. To do so, use the steps described in the <\/em>Verify<em> section in this <a href=\"https:\/\/learn.microsoft.com\/en-us\/entra\/identity\/hybrid\/connect\/how-to-connect-sync-staging-server\" rel=\"nofollow noopener\" target=\"_blank\">Microsoft document<\/a>.<\/em><\/p>\n<\/p>\n<p><h2>Changing the active server<\/h2>\n<\/p>\n<p><p>Once you have installed and verified that the synchronization is working as expected, it is time to perform the AD Connect server switch. To do so, you must enable Staging mode on the old server and disable it on the new server. First, run the AD Connect tool on the <strong>old server<\/strong> and select <em>Configure staging mode<\/em>.<\/p>\n<p> <a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Configure-staging-mode.png\" rel=\"nofollow noopener\" target=\"_blank\">Configure staging mode<\/a> <\/p>\n<p>Next, <strong>check<\/strong> the <em>Enable staging mode<\/em> box and finish the wizard. Once completed, run AD Connect on the <strong>new server<\/strong> and again select <em>Configure staging mode<\/em>. Here, you must <strong>uncheck <\/strong>the <em>Enable staging mode box<\/em>.<\/p>\n<p> <a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Disable-staging-mode.png\" rel=\"nofollow noopener\" target=\"_blank\">Disable staging mode<\/a><\/p>\n<p><p>On the <em>Ready to configure<\/em> screen, be sure to check the <em>Start the synchronization process when the configuration completes <\/em>and click <em>Configure<\/em>.<\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Switch-to-active-mode.png\" rel=\"nofollow noopener\" target=\"_blank\"> Switch to active mode <\/a><\/p>\n<p><p>Once the wizard is complete, you should again check the synchronization results as described in the <em>Verify synchronization results<\/em> section. You can also log in to the Microsoft 365 admin center and check the <em>Directory sync status<\/em> screen under the Health section. <\/p>\n<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Directory-sync-status.png\" rel=\"nofollow noopener\" target=\"_blank\"> Directory sync status <\/a><\/p>\n<p><h2>Postmigration cleanup<\/h2>\n<\/p>\n<p><p>That&#8217;s it! You have migrated Azure AD Connect to a new server. It&#8217;s now time to proceed with the cleanup. Let&#8217;s recall the export configuration step where we discussed noting down the MSOL_XXXXXXX account name that&#8217;s displayed by AD Connect? This account, previously used by the old server to read Active Directory, is now redundant as we&#8217;ve set up a new one during the installation process and can be removed.<\/p>\n<\/p>\n<p><p>A possibly lingering service account is the one used by the Microsoft Azure AD Sync service (accessible in services.msc). This account can also be safely deleted.<\/p>\n<\/p>\n<p><p>The last step consists of uninstalling the AD Connect tool from the old server. This action is carried out through Programs and Features (utilizing <em>appwiz.cpl<\/em>), following standard procedures. In the ensuing uninstall wizard, opt for <em>Also uninstall support components<\/em> if they aren&#8217;t required for other software you may have installed. However, if your plan is to completely decommission the old server, then this step is redundant, and it&#8217;s sufficient to just purge the user accounts.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Entra Connect, formerly named Azure AD Connect, is an on-premises application used to synchronize your local Active Directory objects to Microsoft Entra ID, also known as Azure AD. This post will guide you through the process of migrating Microsoft Entra Connect to a new server. As you may be aware, Microsoft has recently rebranded [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8282,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,92,107,126],"tags":[],"class_list":["post-8281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","category-articles","category-azure","category-cloud-computing"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=8281"}],"version-history":[{"count":1,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8281\/revisions"}],"predecessor-version":[{"id":10209,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8281\/revisions\/10209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/8282"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=8281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=8281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=8281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}