Anavem
Languagefr
How to Migrate Azure AD Connect to a New Server Using Staging Mode

How to Migrate Azure AD Connect to a New Server Using Staging Mode

Complete swing migration of Microsoft Entra Connect to new hardware using staging mode, configuration export/import, and validation steps while maintaining hybrid identity synchronization.

Evan MaelEvan Mael
March 27, 2026 15 min
mediumazure 7 steps 15 min

Why Migrate Microsoft Entra Connect to a New Server?

Microsoft Entra Connect (formerly Azure AD Connect) serves as the critical bridge between your on-premises Active Directory and Microsoft Entra ID, handling identity synchronization for hybrid environments. As servers age or require hardware upgrades, migrating this service becomes essential for maintaining security and performance standards.

The swing migration approach using staging mode is the safest method for this transition. Unlike in-place upgrades, swing migration allows you to build and test the new server completely before switching over, minimizing downtime and reducing the risk of synchronization disruptions that could affect thousands of users.

What Makes Staging Mode Critical for This Migration?

Staging mode is Microsoft's built-in safety mechanism that prevents two Entra Connect servers from simultaneously writing to your tenant. When enabled, the server continues importing changes from Active Directory and processing synchronization rules, but it doesn't export any changes to Microsoft Entra ID. This allows you to fully test your new server configuration while your production server continues operating normally.

The migration process involves exporting your current configuration, installing it on the new server in staging mode, testing thoroughly, then performing a controlled cutover. This approach ensures business continuity while upgrading to newer hardware or operating systems, such as moving from Windows Server 2016 to Server 2022 for enhanced security and support lifecycle benefits.

Implementation Guide

Full Procedure

01

Export Configuration from Current Server

Start by documenting and exporting your current Microsoft Entra Connect configuration. This ensures you can replicate the exact setup on your new server.

Launch the Microsoft Entra Connect configuration wizard on your current server:

Start-Process "C:\Program Files\Microsoft Azure Active Directory Connect\AzureADConnect.exe"

In the wizard, select Configure > View or export current configuration > Next > Export Settings. Save the JSON file to a location accessible from your new server, such as C:\temp\AADConnect_Config.json.

Pro tip: Also document your service accounts manually. Open Synchronization Service Manager and note the usernames for AD DS Connector and Azure AD Connector accounts - you'll need these credentials during the new installation.

Alternative PowerShell method for complete configuration backup:

C:\Program Files\Microsoft Azure Active Directory Connect\Tools\MigrateSettings.ps1 -ServerConfiguration "C:\Temp\AADConnect_Backup"

Verification: Confirm the JSON file contains your tenant information by opening it in a text editor and checking for your domain names and connector details.

02

Enable Staging Mode on Current Server

Before installing on the new server, put your current server into staging mode. This prevents conflicts during the migration process.

Open the Microsoft Entra Connect configuration wizard again and select Configure > Enable staging mode. Check the box for "Enable staging mode: When selected, synchronization will not export any changes" and click Finish.

Warning: Staging mode suspends all exports to Microsoft Entra ID. Your current server will continue importing changes from AD but won't sync them to the cloud until staging mode is disabled.

Verify staging mode is active by checking the synchronization scheduler:

Get-ADSyncScheduler

The output should show StagingModeEnabled: True.

Verification: Open Synchronization Service Manager and confirm that no export operations are running. You should only see import operations in the Operations tab.

03

Install Microsoft Entra Connect on New Server

Download the latest Microsoft Entra Connect from the Microsoft Download Center. Search for "Microsoft Entra Connect download" to get the current 2026 version.

Run the installer on your new server and select Customize installation option. This allows you to import your existing configuration.

During the installation wizard:

  • Choose Import synchronization settings
  • Browse to your exported JSON file from Step 1
  • Enter the same service account credentials you documented
  • Connect to the same Azure AD tenant and AD forest

On the "Ready to configure" screen, make these critical selections:

  • Check "Enable staging mode"
  • Uncheck "Start the synchronization process when configuration completes"

Click Install to complete the setup.

Pro tip: The import process may show warnings about hostname differences or version mismatches - these are normal and expected during migration.

Verification: After installation, run this PowerShell command to confirm staging mode is enabled:

Get-ADSyncScheduler | Select-Object StagingModeEnabled
04

Test Synchronization in Staging Mode

With the new server in staging mode, test the synchronization process to ensure everything works correctly before the cutover.

Open Synchronization Service Manager on the new server and verify that your connectors match the old server configuration. You should see the same AD DS and Azure AD connectors.

Run a full synchronization cycle to test the import process:

Start-ADSyncSyncCycle -PolicyType Initial

Monitor the synchronization progress in Synchronization Service Manager under the Operations tab. You should see successful import operations but no export operations (due to staging mode).

Check for any synchronization errors:

Get-ADSyncConnectorRunStatus
Warning: If you have custom synchronization rules, they won't be imported automatically. Document them now from the old server's Synchronization Rules Editor for manual recreation later.

Verification: Confirm that object counts in the Synchronization Service Manager match your expectations. Check the Statistics tab for each connector to see imported object counts.

05

Recreate Custom Synchronization Rules

Custom synchronization rules don't transfer during configuration import and must be recreated manually on the new server.

On your old server, open the Synchronization Rules Editor and document any custom rules (rules not marked as "Standard"). Take screenshots or export rule definitions:

Get-ADSyncRule | Where-Object {$_.ImmutableTag -eq $null} | Export-Csv C:\temp\CustomRules.csv

On the new server, open the Synchronization Rules Editor and recreate each custom rule with identical settings:

  • Rule name and description
  • Connected system and object type
  • Scoping filters
  • Join rules
  • Transformations and attribute mappings

After recreating custom rules, run a preview to test them:

Start-ADSyncSyncCycle -PolicyType Delta
Pro tip: Test custom rules on a small subset of objects first by using scoping filters before applying them broadly.

Verification: Compare the custom rules on both servers using the Synchronization Rules Editor to ensure they match exactly.

06

Perform the Cutover

Once testing is complete and you're confident the new server works correctly, perform the cutover by decommissioning the old server and activating the new one.

On the old server, uninstall Microsoft Entra Connect:

Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Azure AD Connect*"} | ForEach-Object {$_.Uninstall()}

Alternatively, use Programs and Features in Control Panel to remove "Microsoft Azure Active Directory Connect".

On the new server, disable staging mode by opening the Microsoft Entra Connect configuration wizard and selecting Configure > Disable staging mode or Enable synchronization. Click Finish.

Immediately force a synchronization cycle:

Start-ADSyncSyncCycle -PolicyType Delta
Warning: Don't leave both servers active simultaneously without staging mode, as this will cause conflicts and duplicate object errors in Microsoft Entra ID.

Verification: Confirm staging mode is disabled:

Get-ADSyncScheduler | Select-Object StagingModeEnabled

The result should show StagingModeEnabled: False.

07

Validate Migration Success

After the cutover, thoroughly validate that synchronization is working correctly and monitor for any issues.

Check the synchronization health in the Microsoft Entra admin center:

  • Navigate to Microsoft Entra ID > Hybrid management > Microsoft Entra Connect
  • Verify the "Health status" shows as "Healthy"
  • Check that the "Last sync" timestamp is recent

Monitor synchronization operations in Synchronization Service Manager for the next 24-48 hours. Look for:

  • Successful export operations to Azure AD
  • No persistent errors in the Operations tab
  • Consistent object counts in connector statistics

Run these PowerShell commands to check sync status:

# Check sync scheduler status
Get-ADSyncScheduler

# View recent sync cycles
Get-ADSyncConnectorRunStatus | Select-Object ConnectorName, RunStepResults, StartDate, EndDate

# Check for sync errors
Get-ADSyncConnectorStatistics

Test user synchronization by making a small change in on-premises AD (like updating a user's department) and confirming it appears in Microsoft Entra ID within the next sync cycle.

Pro tip: Set up monitoring alerts in Microsoft Entra ID to notify you of sync failures. This helps catch issues early in production.

Verification: Confirm that new user creations, modifications, and deletions in on-premises AD are properly synchronized to Microsoft Entra ID within your configured sync interval (typically 30 minutes).

Frequently Asked Questions

Can I migrate Azure AD Connect without downtime?+
Yes, using the swing migration method with staging mode provides virtually zero downtime. The old server continues synchronizing while you build and test the new server. The actual cutover takes only minutes to disable staging mode and switch operations to the new server.
What happens to custom synchronization rules during migration?+
Custom synchronization rules are not automatically transferred during configuration export/import. You must manually document and recreate them on the new server using the Synchronization Rules Editor. This is why thorough testing in staging mode is crucial before cutover.
Do I need to reinstall Azure AD Connect if moving to Windows Server 2022?+
Yes, you cannot directly upgrade the operating system with Azure AD Connect installed. The swing migration approach is required when changing the underlying OS. This also ensures you get the latest version of Microsoft Entra Connect optimized for the new server platform.
How long does the Azure AD Connect migration process typically take?+
The complete migration usually takes 4-6 hours including preparation, installation, testing, and validation. The actual cutover is only 10-15 minutes. Most time is spent in the testing phase ensuring custom rules work correctly and synchronization operates as expected in staging mode.
What are the most common issues during Azure AD Connect migration?+
Common issues include service account permission problems, custom rules not working correctly, and DNS resolution issues on the new server. Always verify the new server can reach domain controllers and has proper network connectivity before starting the migration process.
Evan Mael
Written by

Evan Mael

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

Sign in to join the discussion