Frequently Asked Question

Withdrawing from Entra/O365/Microsoft cleanly
Last Updated 2 hours ago

Windows 11: Migrating Entra ID / Microsoft Account Users to Local Accounts

Windows 11: Migrating Entra ID / Microsoft Account Users to Local Accounts

Nov 18, 2026 · @Richard

Which path applies

Check how each user signs in before you touch anything. An Entra-joined PC needs its existing profile reassigned to a new local account (Path B). A personal Microsoft account can be switched in place from Settings (Path A).

Run dsregcmd /status and whoami in a normal command prompt as the user, then match the result below.

What you see Account type Path
AzureAdJoined : YES, whoami returns azuread\username Entra ID work account, device joined to the tenant B (ForensiT profile reassignment), or C if you want a clean start
AzureAdJoined : NO, Settings > Accounts > Your info says "Microsoft account" Personal Microsoft account (outlook.com, or a work address registered as a consumer MSA) A (in-place switch)
WorkplaceJoined : YES only Local or MSA sign-in with a work account added under "Access work or school" Disconnect the work account. The profile is already yours

Order of work for every PC: pre-flight and C:\Users backup → email out → profile migration → test with the user → disconnect from Entra → cleanup. Decommission the tenant only after the last PC and mailbox are signed off.

Pre-flight (every PC, before any change)

Work through these in order. OneDrive must be fully local before the backup, and management agents must be dealt with before BitLocker. Otherwise a policy can switch encryption back on. Start BitLocker decryption early, because it runs for hours in the background.

  1. Create and test a local admin account. When you disconnect from Entra, Entra sign-ins stop working on that PC. Without a working local admin you can be locked out.

    • net user itadmin * /add then net localgroup Administrators itadmin /add
    • Sign in to it once and confirm it is an administrator.
    • If Windows LAPS or Intune manages local admin passwords, note that the policy disappears after unenrolment. Set a password you control.
  2. Inventory management and security agents. Fetch any uninstall or tamper-protection tokens before the weekend.

    • Intune: record the device and its policies (BitLocker, Defender, update rings, LAPS). Check Devices > Enrollment > Windows Autopilot devices. A device left registered there will force itself back into the tenant on its next reset.
    • Other RMM and remote tools: check Apps and Services for NinjaOne, Datto RMM, N-able, ConnectWise, Kaseya, Atera, or TeamViewer/AnyDesk set up for unattended access. Any of them can push policies, scripts or encryption.
    • EDR/AV: for Defender for Endpoint, SentinelOne, CrowdStrike, Sophos and similar, get the offboarding script or uninstall token from the console.
    • For each agent, decide whether to remove it or keep it (if it is your own RMM).
  3. Bring OneDrive data home. Known Folder Move may have redirected Desktop, Documents and Pictures into OneDrive - <Company>. With Files On-Demand, many files exist only in the cloud.

    • Right-click the OneDrive folder > Always keep on this device, wait for sync to finish, and compare the folder size with the online figure.
    • Do the same for any synced SharePoint or Teams libraries.
    • Copy the files to local folders now, then reset each library's location (folder Properties > Location > Restore Default).
  4. Export what is tied to the work account.

    • Edge: passwords (edge://settings/passwords > Export) and favourites (export to HTML). Do the same in Chrome or Firefox if they are used.
    • Any app licensed through the work account (Microsoft 365 Apps, Teams, Adobe and so on). List replacements and licences.
    • Personal certificates, VPN profiles and saved Wi-Fi details, if the work account provisioned them.
  5. Back up C:\Users to an external drive or NAS. Software can be reinstalled; this is the data that can't be. Have every user signed out, then from an elevated prompt run:

    robocopy C:\Users E:\Backup\%COMPUTERNAME%\Users /E /B /COPY:DAT /XJ /R:1 /W:1 /MT:16 /XF *.ost /LOG:E:\Backup\%COMPUTERNAME%-users.log
    
    • /B (backup mode) reads files that only the user has rights to. /XJ skips junction loops. OST files are excluded because they are rebuildable Outlook caches.
    • Check the log summary for a non-zero FAILED count, and spot-check Desktop, Documents and AppData\Roaming.
    • Saved browser passwords in this copy are DPAPI-locked to the old account. The exports from step 4 are your real password backup.
  6. Turn BitLocker off. Check the drive with manage-bde -status C:.

    • First save the recovery key off-device (manage-bde -protectors -get C:). You need it if anything goes wrong mid-decryption.
    • Make sure no Intune or RMM policy from step 2 still enforces encryption. Exclude the device or remove the agent first.
    • Run manage-bde -off C: and repeat for any other fixed drives. It decrypts in the background, from under an hour to several hours depending on drive size and speed, and the PC stays usable meanwhile.
    • Stop Windows 11 automatic device encryption from turning it back on: reg add HKLM\SYSTEM\CurrentControlSet\Control\BitLocker /v PreventDeviceEncryption /t REG_DWORD /d 1 /f
    • Before you disconnect from Entra, confirm the status shows Fully Decrypted and Protection Off.
  7. Check the Windows edition and activation. Run slmgr /dlv. If Microsoft 365 subscription activation upgraded Pro to Enterprise, it falls back to the underlying Pro licence once the work account is gone. Confirm a Pro digital licence or firmware key exists.

  8. Tell the user that their Windows Hello PIN, fingerprint and Microsoft 365 sign-ins will need setting up again.

Email: imapsync still works, with OAuth2

Exchange Online never dropped IMAP. It dropped Basic Authentication on IMAP. imapsync has supported OAuth2 for Office 365 since release 2.216. That makes it the bulk tool again, and it keeps incremental delta syncs for the MX cutover. Use PST export only as a fallback.

Method Best for Notes
imapsync + OAuth2 Bulk, server-to-server, admin-run, incremental Register an Entra app. Either use delegated IMAP.AccessAsUser.All (a token per user), or use client credentials with IMAP.AccessAsApp plus an Exchange service principal that has FullAccess on each mailbox (admin-only, no user interaction). Follow imapsync's FAQ.Office365 for the token step
Thunderbird direct (IMAP + OAuth2) A handful of users, done at the desk Add the account in Thunderbird with server outlook.office365.com:993, SSL/TLS and authentication set to OAuth2. Drag folders into Local Folders or straight into the new provider's IMAP account
Classic Outlook → PST → Thunderbird Last resort, or archives already sitting in PSTs Needs classic Outlook (new Outlook cannot export PST). Import with the ImportExportTools NG add-on

Prerequisites in the tenant

  • IMAP is enabled on each mailbox: Set-CASMailbox user@domain -ImapEnabled $true, or Exchange admin centre > mailbox > Email apps.
  • Conditional Access and authentication policies allow the app or the client.
  • For the application route, the service principal is created in Exchange Online (New-ServicePrincipal) and granted mailbox access (Add-MailboxPermission).

Not carried by IMAP: contacts and calendars. Export contacts as CSV from Outlook on the web (People > Manage contacts > Export). Export each calendar as .ics from classic Outlook. Thunderbird imports both.

Cutover sequence

  1. Lower the MX TTL 48 hours ahead.
  2. Run the first full imapsync pass.
  3. Switch MX and Autodiscover to the new provider.
  4. Run a final imapsync delta pass to pick up stragglers.
  5. Point Thunderbird at the new provider.

Path A: personal Microsoft account → local (in place)

Windows 11, including 25H2, still has a built-in in-place conversion. Settings > Accounts > Your info > Sign in with a local account instead keeps the same profile, files and apps.

  1. Complete pre-flight. Its BitLocker step applies here too, because Home and Pro turn on device encryption with the key held in the user's Microsoft account.
  2. Signed in as the user, open Settings > Accounts > Your info > Sign in with a local account instead.
  3. Confirm identity with the MSA, then set a local username, password and hint.
  4. Click Sign out and finish, then sign back in with the local credentials.
  5. Remove the MSA from Settings > Accounts > Email & accounts, and sign out of the Microsoft Store, OneDrive and Edge sync.

The profile folder keeps its old name (for example C:\Users\jsmit). That is cosmetic. Leave it, because renaming it breaks paths.

Path B: Entra-joined → local (ForensiT User Profile Wizard)

This is the recommended route for Entra-joined PCs. ForensiT User Profile Wizard reassigns the existing profile to a new local account. It moves no files, so the desktop, apps, mapped drives and settings stay as they are. ForensiT states it migrates between any account types, Entra to local included.

Editions: the Freeware edition is run by hand on each PC. Professional and Corporate add scripted, unattended deployment. Pilot the Freeware edition on one PC first, and buy Professional only if you need to script a large batch.

  1. Complete pre-flight, including the C:\Users backup and BitLocker decryption.
  2. Sign the user out and reboot. The profile must not be loaded.
  3. Sign in as the local admin (itadmin), never as the user.
  4. Create the target local account, because the Wizard does not create accounts: net user jsmith * /add. Do not sign in to it yet. Signing in would create a second, empty profile.
  5. Install and run User Profile Wizard as administrator.
    • Select the user's existing AzureAD\jsmith profile. If the PC has already been disconnected, click Show unassigned profiles and pick the folder.
    • For the domain, choose the computer name (the local machine) from the drop-down. Leave the Azure AD box unticked.
    • For the account name, enter jsmith. Tick Set as default logon. Do not tick any domain-join option.
  6. Let it finish and reboot. Large profiles can take 20–30 minutes or more while it rewrites ACLs.
  7. Sign in as jsmith and run the verification checks with the user (Cleanup section).
  8. Only after sign-off, disconnect from Entra: Settings > Accounts > Access work or school > [organisation] > Disconnect, or dsregcmd /leave from an elevated prompt. Reboot.

Avoid the manual alternative of editing ProfileImagePath under the ProfileList registry key. It also needs ownership and ACL fixes across the profile and its hive, and it commonly breaks Store apps and the Start menu.

Path C: new local profile + copy data (fallback)

Use this when the old profile is corrupt or bloated, or when the client wants a clean start. It is slower for the user, because apps need signing in again and some settings do not survive.

  1. Complete pre-flight. Create the local user and sign in once to build a fresh profile, then sign out.

  2. As itadmin, copy the user folders with fresh permissions (no ownership is copied, so the new user's ACLs are inherited):

    robocopy "C:\Users\<old>\Documents" "C:\Users\jsmith\Documents" /E /COPY:DAT /XJ /R:1 /W:1 /LOG+:C:\migr.log
    
  3. Repeat for Desktop, Downloads, Pictures, Music, Videos and Favorites, plus any folder in the profile root.

  4. Copy only the AppData you need, with the apps closed. Examples: the Thunderbird profile, Outlook signatures and Sticky Notes. Do not rely on copying browser profiles. Saved passwords are DPAPI-encrypted to the old account and will not decrypt, so import the exported CSV instead.

  5. Reinstall per-user apps (Teams, Zoom, Spotify and so on) and re-import the browser exports.

  6. Disconnect from Entra as in Path B step 8.

  7. Keep the old profile for 30 days, then remove it via System Properties > Advanced > User Profiles > Delete. Do not delete the folder by hand.

Cleanup and verification

After disconnecting, confirm the PC is clean on its side and in the tenant. Deregistering from Autopilot is the step people most often miss.

On the PC

  • dsregcmd /status shows AzureAdJoined : NO and WorkplaceJoined : NO.
  • Settings > Accounts > Access work or school is empty, and Email & accounts lists no work account.
  • manage-bde -status shows every drive as Fully Decrypted with Protection Off, and the PreventDeviceEncryption value is set.
  • RMM, remote-access and EDR agents from the pre-flight inventory are removed or re-pointed to your own console. Each machine no longer shows up in the client's old consoles.
  • slmgr /dlv shows Windows activated, Pro edition.
  • Uninstall Company Portal, Microsoft 365 Apps and work Teams (and OneDrive, if not wanted). Install the replacements.
  • Windows Update and Defender settings are no longer "managed by your organisation". If any policy lingers, check HKLM\SOFTWARE\Microsoft\PolicyManager and HKLM\SOFTWARE\Microsoft\Enrollments for leftover entries.
  • Set up a new Windows Hello PIN. Confirm the user's files, desktop, printers, mapped drives and Thunderbird.

In the tenant (per device)

  • Intune: retire or delete the device. Do not issue Wipe.
  • Windows Autopilot devices: delete the hardware hash registration.
  • Entra ID > Devices: delete the device object.

Tenant decommission (last): keep one Global Admin and the licences until every mailbox has had its final delta sync and every PC is signed off. Then remove the domain and cancel the subscriptions.

Per-machine sign-off and rollback

Copy this list per PC. Stop at any unticked box before the Entra disconnect, because every step up to that point can be reversed.

  • Local admin created and tested
  • Intune, RMM and EDR agents inventoried, with tokens in hand
  • OneDrive and SharePoint data fully local
  • Browser passwords and favourites exported
  • C:\Users backed up, with zero FAILED in the log
  • BitLocker key saved, then decryption complete (Protection Off)
  • Mailbox synced (first pass) and contacts and calendar exported
  • Profile migrated (Path A, B or C)
  • User signed in and confirmed files, apps and email
  • Disconnected from Entra
  • RMM and EDR agents removed or re-pointed
  • Activation and edition confirmed
  • Intune, Autopilot and Entra device records removed

Rollback

  • Before the disconnect: run User Profile Wizard again to point the profile back at the AzureAD\ account, or just sign in as the Entra user (Path C leaves the old profile untouched).
  • After the disconnect: rejoin Entra and reassign the profile with the Wizard. If the profile itself is damaged, create a fresh local profile and restore the data from the C:\Users backup with the Path C robocopy steps. Reinstall software as needed.

Sources

Powered by GEN UK CLEAN GREEN ENERGY

Loading ...