IT Monitoring Tool
How to Migrate Active Directory

Migrate Active Directory to Microsoft Entra ID: A 6-Phase Guide (2026)

Migrate Active Directory to the cloud in three stages: on-prem only, then hybrid, then cloud-only.

Users go first, because Entra Connect copies them across and nobody even notices. Devices go last, and that’s where people notice, because every PC gets wiped and comes back with a fresh Windows profile. Cue the help desk tickets.

Every step below to migrate Active Directory comes straight out of my lab, so you can follow along click for click. Nothing fancy:

  • A Windows Server 2022 VM on Hyper-V, promoted to a domain controller (Hyper-V because it’s the least infuriating hypervisor, which is a low bar i know).
  • A few dummy users living in Sydney OUs.
  • A Windows 11 PC joined to the domain the old-fashioned way.
  • A Microsoft Entra tenant with my domain verified (one TXT record, you’ll figure that out).

A real company has a lot more junk in the trunk: email, file shares, that one finance app from 2009, printers that hate everyone.

I’m not covering those here, but the gotchas section points out where they’ll bite you in the ****. If you’re planning to migrate Active Directory for an actual business, treat this guide as the identity and device backbone and build the rest around it.

Before you migrate Active Directory

Most attempts to migrate Active Directory go tits up before the first click, thanks to dirty data or a missing license. Sort this lot out first.

Licenses. Password writeback, dynamic groups and Intune auto-enrolment all need Entra ID P1 or better. Microsoft 365 Business Premium and E3 include it. I only remembered this at the password reset step, then spent an evening convincing Azure my perfectly normal credit card was real. Raised a support case, it got fixed, nobody ever told me what was wrong. Classic Microsoft.

A verified domain. Add your real domain (mine is monrocloud.com) to the tenant and verify it with the TXT record Microsoft hands you.

Clean UPNs. The UPN (user principal name) is the sign-in name, like david@monrocloud.com. If your on-prem domain ends in .local or .lan, those users rock up in the cloud as david@yourtenant.onmicrosoft.com, which looks about as professional as a Hotmail address. Add your verified domain as an alternative UPN suffix in Active Directory Domains and Trusts, then switch each user over. Source

Run IdFix. IdFix is Microsoft’s free tool that sniffs out duplicates and dodgy characters in AD before you sync. It can bulk-edit objects, so read what it wants to change before you let it loose. Source

A server for Entra Connect. I chucked it on the domain controller because it’s a lab and I’m lazy. Don’t do that in production. Give it its own member server and guard it like a domain controller, because it holds the keys to both directories.

Accounts you’ll need:

  • A Global Administrator (or Hybrid Identity Administrator) in the tenant
  • An Enterprise Admin in on-prem AD

Connect Sync or Cloud Sync? Cloud Sync is Microsoft’s shiny new toy and where they’re heading long term. I’m using Entra Connect Sync (good old Azure AD Connect) because most organisations still run it and it handles hybrid device join, which this whole migration leans on.

Phase 1: Sync your users with Entra Connect

This phase copies your AD users into Entra ID with the same username and password. Users won’t notice a thing, which makes it the safest place to start when you migrate Active Directory.

1. Download Connect Sync. In the Microsoft Entra admin center, type Microsoft Entra Connect into the search bar, open the Manage tab and grab the installer. The page might still call it Azure AD Connect, because Microsoft renames things faster than it updates them.

Common terminology is “Cloud Sync” (NEW) and “Connect Sync” (OLD).

How to Migrate Active Directory: Entra Admin Center Sync Options

2. Pick Customize, not Express. Express is for people who enjoy surprises. Customize lets you choose which OUs sync and which features switch on.

3. Choose the sign-in method. Select Password Hash Synchronization and tick Enable single sign-on. Password hash sync sends a hash of a hash of each password to the cloud, never the password itself, so users log in to Microsoft 365 with the password they already know (and probably have on a Post-it). Seamless SSO means a domain-joined PC on the office network signs them in without asking.

How to Migrate Active Directory: Enable Single Sign-On

4. Sign in to Entra with a Global Administrator from the tenant. If the login box throws a JavaScript error or just stares at you blankly, jump to gotcha 3.

5. Connect your directory. Directory type is Active Directory forest. Click Add Directory, choose Create new AD account, and feed it your Enterprise Admin details. The wizard makes its own service account for syncing.

Connect Directories
How to Migrate Active Directory: Connect Directories

6. Check the UPN mapping. The wizard reads the AD schema, which is just the list of fields each user has (email, phone, employee ID and so on), and asks which one becomes the cloud sign-in name. Leave it on userPrincipalName if your UPNs are already clean.

UPN Options
How to Migrate Active Directory: UPN Options

7. Leave identity matching alone. Users are represented only once across all directories is right for a single forest. You’d only change it after a merger, when two on-prem accounts for the same poor bastard need to become one cloud account. The source anchor is the permanent ID that glues the on-prem user to the cloud user. I honestly can’t think why you’d change it, so don’t.

8. Filter by OU. Tick only the OUs you want to move. I ticked the Sydney OUs. If all your users are dumped in one big Users container (no judgement… ok, a little judgement), filter by a pilot group instead.

Filtering Results
How to Migrate Active Directory: Filtering Results

9. Turn on Password writeback. On Optional features, tick Password writeback. Without it, a password reset in the cloud never reaches on-prem AD, and self-service password reset is about as useful as a chocolate teapot.

Enable Password Writeback
How to Migrate Active Directory: Enable Password Writeback

Kick off a sync. Open PowerShell on the Entra Connect server and run this decades-old favourite:

Start-ADSyncSyncCycle -PolicyType Delta

Refresh Users in the Entra admin center. My three test users showed up, tagged as synced from on-premises. A bit bleak with so few attributes, but it proves the first part of your plan to migrate Active Directory actually works.

Synced Users
How to Migrate Active Directory: Synced Users

Phase 2: Prove password writeback works

If a password changes in the cloud, it has to change on-prem too. Otherwise users end up with two passwords and you end up with a queue of angry people.

1. Assign a P1 licence to each test user.

2. Check writeback is on in both places: the Entra Connect wizard (done in Phase 1) and in Entra Admin Center > Password reset > On-premises integration. The second option un-ticked is correct for this lab, it is only used for “Cloud Sync” whereas we are using “Connect Sync”

Microsoft Naming Discussions
How to Migrate Active Directory: Microsoft Naming Discussions
Enable Password Writeback for Synced Users
How to Migrate Active Directory: Enable Password Writeback for Synced Users

3. Reset a test user’s password in the Entra Admin Center. Go to Users > select the user > Reset password (don’t use the Microsoft 365 admin center. I’m a dinosaur and went straight there out of habit, and it doesn’t work – see gotcha 4).

4. Log in on the domain-joined PC with the new password. If it works, you should asked to reset the password on next logon.

⚠️ Note: Group policy may require changing if you want to reset the password more than once during testing. I have set the Minimum password age to 0 so I can repeatedly test (see screenshot below). Do this at your own risk, there are obvious security implications to users being able to reset passwords as often as they like.

Minimum Password Age GPO
How to Migrate Active Directory: Minimum Password Age GPO

Users are syncing and passwords flow both ways, so the user half of your plan to migrate Active Directory is done. Pat yourself on the back… now get back to work. 🤨

Phase 3: Hybrid join your devices

Hybrid join means a PC stays married to on-prem AD while having a fling with Entra ID on the side. It’s the bridge that lets you migrate Active Directory devices, because Intune and Autopilot can now see machines built the old way.

1. Reopen the Entra Connect wizard and pick Configure device options. Identity sync pauses (not password replication) while the wizard is open. Don’t panic, it starts again when you close it.

Configure Device Options
How to Migrate Active Directory: Configure Device Options

2. Select Configure Hybrid Microsoft Entra ID join, then Windows 10 or later domain-joined devices. The other option is for Windows 7, 8.1 and Server 2012 R2. If you still need that one, we should talk.

Configure Hybrid Microsoft Entra ID Join
How to Migrate Active Directory: Configure Hybrid Microsoft Entra ID Join

3. Configure the SCP. The service connection point is a little record in AD that works like a signpost. A domain-joined PC has no clue the cloud exists, so when it talks to a domain controller, the SCP tells it which Azure tenant to register with. Pick your forest, choose Microsoft Entra ID as the authentication service and enter Enterprise Admin credentials.

SCP Configuration
How to Migrate Active Directory: SCP Configuration

4. Reopen the Entra Connect wizard.

5. Sync the computer objects. Back in Customize synchronization options > … > Domain and OU filtering, tick the OU holding your PCs (obviously in production you would do this one OU at a time).

Customize Synchronization Options
How to Migrate Active Directory: Customize Synchronization Options
Domain/OU Filtering
How to Migrate Active Directory: Domain/OU Filtering

6. Run a delta sync (same command as Phase 1, below for your convenience), then check Devices in the Entra Admin Center. The PC shows as Pending.

Start-ADSyncSyncCycle -PolicyType Delta

Phase 4: Auto-enrol devices into Intune

Once you migrate Active Directory devices, Intune is what manages them.

A group policy tells each hybrid-joined PC to enroll itself, so nobody has to wander around the office with a USB stick like it’s 2008.

1. Set the MDM user scope. In the Intune Admin Center go to Devices > Enrollment > Windows > Automatic Enrollment and set MDM user scope to All (or Some with a pilot group).

MDM User Scope
How to Migrate Active Directory: MDM User Scope

2. Move the PC into a synced OU. I dragged my test PC into the “Sydney” OU so it syncs and picks up the new policy.

3. Create a GPO (mine’s called “MDM”) linked to that OU. Edit it and go to:
Computer Configuration > Policies > Administrative Templates > Windows Components > MDM.

4. Enable Enable automatic MDM enrollment using default Azure AD credentials and set the credential type to Device Credential. If the MDM folder isn’t there, load the latest Windows ADMX templates into your Central Store.

⚠️ Note: the MDM Application ID is only required if you use more than one MDM product.

Enable Automatic MDM Enrollment GPO
How to Migrate Active Directory: Enable Automatic MDM Enrollment GPO

5. Apply it. On the PC run gpupdate /force, then restart the PC.

6. Check the scheduled task. Open Task Scheduler and browse to Microsoft > Windows > EnterpriseMgmt. A task appears once enrolment starts and it’s a great way to see if something is happening. If the folder’s empty after a restart, something’s blocking it. For me it was DNS. It’s always bloody DNS.

How to Migrate Active Directory: Confirm Scheduled Task

7. Confirm in Intune. The PC turns up under Intune > Devices > Windows Devices, about 10 minutes after the scheduled task appeared.

Phase 5: Register the PC with Autopilot

Autopilot is how you migrate Active Directory PCs to cloud-only: it rebuilds each one after the wipe. This phase registers the existing PC with Autopilot and gives it a new profile.

3rd party tools exist to migrate the user profiles – however these were not tested during the lab. Microsoft support would be limited or not available with any 3rd party apps used to clone profiles.

Step 1: Create a pilot group

In the Entra Admin Center go to Groups > New group, choose Assigned membership and add the hybrid-joined PC. Mine’s called “Windows 11 Autopilot”.

Step 2: Create the deployment profile

In Intune go to Devices > Enrollment > Windows > Deployment profiles > Create profile > Windows PC and use these settings:

SettingValueWhy
Convert all targeted devices to AutopilotYesRegisters PCs that were never imported with a hardware hash
Deployment modeUser-drivenA human signs in during setup. Self-deploying is for kiosks
Join to Microsoft Entra ID asMicrosoft Entra joinedThe whole point. No more on-prem join
Keyboard layoutYour local layoutStops the $ sign wandering off while users type their password

Assign the profile to the Windows 11 Autopilot group.

Autopilot Deployment Profile Configuration
How to Migrate Active Directory: Autopilot Deployment Profile Configuration

Step 3: Meet the PC’s evil twin

Once the profile kicks in, Devices in Entra shows the PC twice. One is the hybrid-joined object with its normal name. The other is named after the PC’s serial number, a random-looking mess of letters and numbers. That’s the Autopilot record, the identity the PC will use once it’s cloud-only. Microsoft says the double-up is expected, thanks to some ancient database logic (which I’m sure someone in the comments will explain in excruciating detail).

How to Migrate Active Directory: Duplicate Devices After Cloud Migration

Step 4: Build the dynamic group

Now you need a group that scoops up those Autopilot records on its own. Go to Groups > New group, set Membership type to Dynamic Device, click Add dynamic query, then Edit under Rule syntax, and paste:

(device.devicePhysicalIDs -any (_ -startsWith "[ZTDId]"))

In plain words: “add any device that has an Autopilot ID”. Every Autopilot-registered device carries a hidden ZTDId value, so this rule picks up each serial-number object as it appears. Mine’s called Windows 11 dynamic. Source

Only want a pilot batch? Give those PCs a group tag in Autopilot and filter on that instead:

(device.devicePhysicalIds -any (_ -eq "[OrderID]:Win11Pilot"))
Creating Dynamic Groups
How to Migrate Active Directory: Creating Dynamic Groups

Step 5: Check members, then assign

Open the dynamic group’s Members and make sure it only caught the PCs you expect. If it’s hoovered up the CFO’s laptop and you’re not ready to wipe it, stop and narrow the rule. Then add the dynamic group to the deployment profile’s assignments.

The profile status goes from Not assigned to Pending to Assigned. Mine took about an hour. Pretty sure MS use homing pigeons as part of the profile status updates, it is NOT quick!

Phase 6: Wipe the PC and go cloud-only

There’s no supported magic button that turns a hybrid-joined PC into an Entra-joined one in place. The PC has to be wiped and rebuilt by Autopilot, so this is the riskiest part of any plan to migrate Active Directory. Most of the work is making sure you don’t nuke anyone’s stuff.

Prepare the user before the wipe

The user gets a brand-new Windows profile. Whether that’s a non-event or a total s**tshow depends on what you do beforehand. Back in the XP to Windows 7 days we’d wipe machines overnight and leave printed instructions on the keyboard. It’s better now. Not perfect, but better.

  • Turn on OneDrive backup (Known Folder Move). Desktop, Documents and Pictures then live in OneDrive. After the rebuild, OneDrive signs in and the desktop icons pop straight back. Turn it on regardless, because sooner or later a laptop is going to wear a flat white.
  • Hunt for files outside the profile. Anything in C:\Temp, C:\Data or some random folder on the C: drive is gone after the wipe. Every office has one person hoarding critical spreadsheets in C:\Temp. Find them!
  • Check where email lives. If mail sits in Exchange Online, it comes back by itself. If the PC downloads mail locally, from on-prem Exchange archives, a PST or a non-Microsoft POP/IMAP account, the wipe deletes it. Test this first on a real-world pilot group.
  • List what won’t follow the user. Browser bookmarks (unless browser sync is on), the Start menu layout, mapped drives and email signatures saved on the device may all be lost.
  • Tell people what’s coming. A short video, a one-page guide or a 15-minute walkthrough all work. Users who expect a fresh desktop and an MFA prompt call the help desk a lot less.

There are third-party tools that copy the old profile across. Microsoft doesn’t support any of them and it goes without saying you would need to do extensive testing before even considering this a viable option.

Run the wipe

  1. In Intune go to Devices > Windows Devices, open the PC and click Wipe.
  2. Leave Wipe device, and continue to wipe even if devices lose power unticked. That protected option can leave a PC unbootable if anything goes sideways mid-reset.
  3. Click Wipe to confirm, and maybe cross your fingers.
Wiping the Device
How to Migrate Active Directory: Wiping the Device

Intune says the wipe is Complete long before the PC is actually done. The PC restarts, shows a percentage screen and takes around 30 minutes.

First sign-in

1. The PC lands on the normal out-of-box screen. The user signs in with their cloud name, for example david@monrocloud.com.

2. They set up MFA if they haven’t already.

3. Windows Hello asks for a PIN.

Windows Hello Sign-In
How to Migrate Active Directory: Windows Hello Sign-In

Check it with dsregcmd /status. You want AzureAdJoined : YES and DomainJoined : NO. That PC doesn’t need your domain controller anymore. Free at last.

Confirmation of Azure Joined Only
How to Migrate Active Directory: Confirmation of Azure Joined Only

YouTube Lab: How to Migrate Active Directory

Gotchas when you migrate Active Directory

These are the traps that cost me, and plenty of other engineer’s real time.

1. Old Entra Connect versions have already stopped syncing. Since 30 September 2026, any Entra Connect Sync server below version 2.5.79.0 stops syncing until you upgrade it. Auto-upgrade only works from 2.3.20.0 or later, and crusty old servers often need .NET Framework 4.7.2 and TLS 1.2 first. Install the latest build, not the bare minimum, because older builds hit their own end-of-support dates. (Microsoft, Everywan)

2. .local users sync to the wrong name. A user like holly@contoso.local becomes holly@contoso.onmicrosoft.com in the cloud. Add a routable UPN suffix and fix users before you migrate Active Directory accounts, because renaming them afterwards confuses the hell out of everyone. (Microsoft)

3. The Entra sign-in box shows a script error or goes blank. Blame Internet Explorer security on the server, the gift that keeps on giving. Run inetcpl.cpl, open Security > Custom level, set Active scripting to Enable, then close and reopen the Entra Connect wizard.

Enable Active Scripting to Prevent White-Box Issue
How to Migrate Active Directory: Enable Active Scripting to Prevent White-Box Issue

4. Resetting passwords in the Microsoft 365 admin does not writeback to on-prem AD. The user can log in to the cloud, but on-prem AD keeps the old password. Microsoft confirms the 365 admin center doesn’t use the writeback plumbing, so do resets in the Entra admin center. That’s half an hour of my life I’m not getting back. (Microsoft)

5. Repeated test resets fail the password policy. Writeback still obeys your on-prem password rules, and the default Minimum password age is 1 day. Reset twice in a day and you get a “does not meet policy” error. In a lab you can drop it in Default Domain Policy > Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Password Policy. Don’t go loosening company policy just to make testing easier. That’s on your head, not mine.

Minimum Password Age GPO
How to Migrate Active Directory: Minimum Password Age GPO

6. No P1 license, no writeback. Password writeback and dynamic groups both need Entra ID P1. Sort the license and the payment method early. My card got knocked back for no reason anyone could explain.

7. Two objects per PC is normal. After Autopilot registration, Entra lists the hybrid object and a serial-number object. Don’t delete either one to tidy up. The serial-number one is exactly what the dynamic group needs.

8. “Convert all targeted devices” doesn’t convert the join. It only registers the PC with Autopilot. Microsoft says plainly that a hybrid-joined PC doesn’t become Entra-joined from this setting alone. The wipe does that. Microsoft’s own advice is to move existing PCs at a natural reset or hardware refresh where you can. (Microsoft, Tech Community)

9. Autopilot profile assignment is as slow as a wet week. Expect up to an hour between adding the dynamic group and seeing Assigned. Fiddling with settings during that wait just resets the clock.

10. An empty EnterpriseMgmt task folder means enrolment is stuck. Mine was DNS. Check the PC can resolve Microsoft endpoints and reach a domain controller before you go down a rabbit hole.

11. Smart quotes break the dynamic rule. Copy the rule out of a web page or Word and the " can turn into curly quotes, and Entra throws a tantrum. Paste it into Notepad first. (Peter van der Woude)

12. “Wipe complete” is a filthy lie. Intune reports success long before the reset finishes. Wait until the PC hits the out-of-box screen before you call the user.

13. Seamless SSO has a key to rotate. Turning on SSO creates a computer account called AZUREADSSOACC in AD. Microsoft recommends rolling its Kerberos key at least every 30 days with Update-AzureADSSOForest, and treating that account like the crown jewels. (Microsoft)

14. Never migrate Active Directory in one big bang. Filter by OU or group, pilot with a handful of users and PCs, then go wider. One bad filter can shove hundreds of objects into the cloud in a single cycle.

After you migrate Active Directory: what’s left?

After the six phases, your users sign in with cloud identities, and your pilot PC is Entra-joined, managed by Intune and doesn’t give a toss about your domain controller. Repeat Phases 3 to 6 one OU or one team at a time until every PC has moved.

To fully migrate Active Directory, a few jobs remain after the devices: move mail off on-prem Exchange, swap Group Policy settings for Intune profiles, shift file shares to SharePoint or OneDrive, and find a new home for anything still authenticating against AD, like printers, Wi-Fi and that one ancient app nobody will admit to owning. Once nothing points at AD anymore, switch off sync and retire the domain controllers. Maybe hold a small funeral.

Sources

Other Content