Skip to main content
Move Windows devices that are enrolled in Microsoft Intune to Primo. The Primo agent moves the devices. If a device stays on Intune, a script is the fallback: see Troubleshoot a device that stays on in another MDM. This article covers devices that are already enrolled in Intune. For new devices, use zero-touch for Windows. For Macs, see Migrate Macs using Apple Business.

Platform compatibility

Prerequisites

  • An admin account in the cockpit
  • If you use an EDR: an exclusion for the agent (see EDR exclusions (Windows) in Read before you start)
  • To change the MDM scopes in Entra: a Microsoft account with the Global Administrator role on your Entra tenant, and a licence that includes Microsoft Entra ID P1 or P2. Microsoft lists automatic MDM enrollment as a premium Entra feature
  • The {company} subdomain of your MDM address ({company}.mdm.getprimo.com). Contact support if you don’t know it

Read before you start

Back up the BitLocker recovery keys before you touch the devices in Intune or Entra. Microsoft documents two behaviors that can lock employees out:
  • Retire and Delete in Intune remove an Entra joined device from Entra ID, so employees can no longer sign in with their Entra account. Intune also removes the key protectors of the operating system volume, which suspends BitLocker (Microsoft Learn: Retire).
  • Deleting a device object in Entra removes the BitLocker keys attached to it, and Microsoft describes this as nonrecoverable (Microsoft Learn: Manage device identities).
Microsoft’s Retire page also lists the credentials of a local administrator account as something to back up first. The steps below don’t use Retire or Delete.
If you use an EDR, exclude the agent before you deploy it. Otherwise the EDR can quarantine it, and the device can’t migrate.Exclude the folder C:\Program Files\Orbit. If your EDR needs exact paths, exclude these files:
  • C:\Program Files\Orbit\bin\orbit\orbit.exe (the Primo agent)
  • C:\Program Files\Orbit\bin\osqueryd\osqueryd.exe (the osquery daemon)
  • C:\Program Files\Orbit\bin\desktop\fleet-desktop.exe (Fleet Desktop)
For SentinelOne, add them as Path exclusions with Include subfolders and the Interoperability mode. On a SentinelOne instance provided by Primo, the exclusions are already set. See Exclude the Primo agent from SentinelOne.
A Windows device has one MDM (Microsoft Learn: MDM overview). Microsoft Learn documents no procedure to move an Entra joined device from Intune to another MDM, and no effect of an MDM scope change on devices already enrolled in Intune. Run the whole procedure on one device you own before you move the others.

Migrate with the agent

With Automatic MDM migration on, the Primo agent unenrolls the device from Intune, then enrolls it in Primo with the Fleet discovery URL, without going through Entra. The Entra MDM scope isn’t needed for this method.
1

Turn on Automatic MDM migration

In the cockpit, go to MDM > Settings. In the Enrollment section, turn on Automatic MDM migration. It’s off by default.Screenshot: The Enrollment section of MDM > Settings in the cockpit, with the Automatic MDM migration toggle off, its default stateWith it on, the Primo agent on a Windows device enrolled in another MDM unenrolls the device from that MDM, then enrolls it in Primo. This applies to every device that has the agent and is enrolled in another MDM. See MDM settings.To also set the Intune MDM scope to None as a precaution, see Move the device with a script. This is the guidance of the Primo cockpit: Microsoft doesn’t document what a scope change does to devices already enrolled.
2

Deploy the agent through Intune

Deploy the Primo agent to the devices you want to move, as a silent install through Intune. See Silent agent deployment for where to download the package.A device appears in the cockpit with the status On in another MDM once the agent is installed. Without the agent, the cockpit doesn’t see that the device is managed elsewhere.If you deploy a generic installer, the cockpit may not know whose device it is. See Use assignment suggestion.
3

Check the status

In the cockpit, the device status goes from On in another MDM to On. See Check the migration.

Check the migration

  • In the cockpit, the device’s MDM status changes from On in another MDM to On.
  • On the device, the active enrollment’s DiscoveryServiceFullURL is your Fleet discovery URL, https://{company}.mdm.getprimo.com/api/mdm/microsoft/discovery. To list the values, run:
  • If a device stays on On in another MDM or goes back to Intune, see Troubleshoot a device that stays on in another MDM.

Move your Intune policies to Primo

The settings that Intune applies are defined in Intune. To keep them after the move, recreate them in Primo before you move the devices. Microsoft documents that when Intune retires a device, the settings set by Intune policy are no longer enforced and users can change them (Microsoft Learn: Retire). Learn doesn’t document this for a device that leaves Intune through the agent, so check it on a pilot device.
  1. List what to recreate. In the Intune admin center, go to Devices > Manage devices > Configuration. You can export a Settings catalog policy as JSON to read its settings (Microsoft Learn: Settings catalog).
  2. Look for a Primo control first. See the available controls.
  3. For a Windows setting that no control covers, use CSP Builder and the Custom file control. The Windows settings of the Settings catalog are generated from the Windows CSPs, and the Learn more link in a setting’s tooltip opens its CSP (Microsoft Learn: Settings catalog). Find the same setting in the Policy CSP catalog of CSP Builder, set its value, and load the file on the Custom file control. See Custom file.
CSP Builder doesn’t import Intune profiles: it generates the file from the Policy CSP catalog. Primo doesn’t check the settings inside a custom file, so test each one on a pilot device.

Troubleshoot a device that stays on in another MDM

If a device keeps the status On in another MDM after the migration, check these points:
  • Automatic MDM migration is on in MDM > Settings.
  • The agent is installed and communicating. Without it, the cockpit can’t migrate the device.
  • The device isn’t a Windows Server. The agent doesn’t unenroll Windows Server devices.
  • The agent spaces its attempts, so allow some time before you decide a device is stuck.
  • The Intune scope is None (or a group that doesn’t include the user), so the device doesn’t go back to Intune.
For other statuses, see Resolve enrollment issues.

Move the device with a script

If the checks above don’t fix it, run the migration script on the device. The script goes through Entra automatic enrollment, so it needs what the agent method doesn’t: the Fleet application and the MDM scopes in Entra. Microsoft doesn’t document the deviceenroller.exe command the script uses, so test it on a pilot device.
1

Open Mobility (MDM and WIP)

In the Entra admin center, go to Mobility (MDM and WIP). The list shows the applications that can enroll devices. You need Fleet and Microsoft Intune in it.Screenshot: The Mobility (MDM and WIP) page in the Microsoft Entra admin center, listing the Fleet and Microsoft Intune applications
2

Create the Fleet application if it's missing

The Fleet application is what tells Entra to send automatic enrollment to Primo. It holds the terms of use and discovery URLs of your MDM. Without it, the script can’t enroll a device in Primo. If your devices come from Intune, you probably haven’t created it yet:
  • Click + Add application > + Create your own application, enter Fleet as the name, and click Create.
  • Set MDM terms of use URL to https://{company}.mdm.getprimo.com/api/mdm/microsoft/tos and MDM discovery URL to https://{company}.mdm.getprimo.com/api/mdm/microsoft/discovery, then save.
  • Set the Application ID URI and the API permissions. The details are in Create the Fleet application, in step 3 (Connect Azure and Fleet) of Set up zero-touch.
Follow steps 1 to 3 of that article in order: connect Entra, declare the Fleet domain, and create the Fleet application. Each step unlocks the next. The domain step goes through Primo support and takes up to 2 business days, so start with it. Skip them if your Autopilot setup is already done.
3

Set the Intune MDM scope to None

Click Microsoft Intune, set MDM user scope and WIP user scope to None, and click Save. We recommend it, so that a device doesn’t go back to Intune: this is the guidance of the Primo cockpit, and Microsoft doesn’t document what a scope change does to devices already enrolled.Screenshot: The Microsoft Intune settings in Entra, with MDM user scope and WIP user scope set to NoneTo move devices in batches, set the Intune MDM user scope to Some and select a group instead of None.
4

Set the Fleet MDM scope

Click Fleet, set MDM user scope to All, and click Save. To move devices in batches, set Fleet to Some with the group you move.Only one MDM can have the All scope: Microsoft requires that no user belongs to more than one selected group and that no other application is set to All (Microsoft Learn: Mobility scopes).
5

Run the script

The script removes the enrollment of your previous MDM from the Windows registry, then triggers a new enrollment. Replace INPUT_URL_HERE with the discovery URL of your previous MDM. To find it, read the DiscoveryServiceFullURL value under HKLM:\SOFTWARE\Microsoft\Enrollments\ on a device enrolled in Intune.
Run the script on one device first, your own. Then move the others one by one, or all at once with a policy.
6

Run the script with a policy

For many devices, use a policy in the Fleet console. Upload the script to Controls > Scripts, create a policy with the query below, and link the script to it.The policy passes when the device has no enrollment left with another discovery URL, and fails when it still has one. Fleet runs the linked script when the policy fails on a device: the first time it fails, and each time it goes from passing to failing.
Replace {company} with your subdomain:

If you also use Autopilot

Autopilot is a separate job from the migration. It applies to new or reset devices. Microsoft downloads the Autopilot profile when a device first starts and doesn’t replay it on a device that is already provisioned (Microsoft Learn: Autopilot FAQ).
  • Zero-touch needs the Fleet scope set to All, as in Move the device with a script. The other steps (deployment profiles, device registration, testing) are in Zero-touch for Windows. That article has you create deployment profiles in Microsoft’s Intune admin center. This is the Autopilot service, not the MDM enrollment of your devices.
  • Don’t delete Autopilot devices or their Entra objects as part of the migration. Microsoft warns that deleted system-managed devices can’t be reprovisioned (Microsoft Learn: Stale devices).