Find the Tenant Where a Device is Autopilot Registered

If you do a lot of testing with different Intune tenants, you probably have several test devices or VMs that you use. Occasionally, you may forget to remove one from a client tenant after doing your testing. When this is a test VM, it’s not a very big deal. Tearing it down and recreating it is a quick and simple process, but if you’re using a physical device, it’s not as easy. This is especially true if you’re testing a self-deploying autopilot profiles for Kiosk deployments. Those require physical TPM 2.0 hardware, so you can’t use a virtual machine to test.

If a device is already registered with Autopilot in another tenant, you’ll see the below error when attempting to register the device:

If you remember which tenant the device is registered with, you can simply sign into that tenant and remove the device from Autopilot. If you don’t know which tenant the device is registered with, we can look in the registry on the device. From your command prompt (if you’re at the OOBE you can use shift+F10 to open CMD), type regedit to open the registry editor. Navigate to the following key:

  • HKLM\SOFTWARE\Microsoft\Provisioning\Diagnostics\AutoPilot

You’ll see a bunch of values under this key, but there are two that stick out with tenant information – CloudAssignedTenantID and CloudAssignedTenantDomain. These two values contain the domain name and tenant ID where the device is registered.

Alternatively, you can use the key HKLM\SOFTWARE\Microsoft\Provisioning\AutopilotPolicyCache, which will also show you the domain and tenant ID from the Autopilot JSON file:

You can’t unassign the device from Autopilot from the device itself, but now you know which tenant it’s registered with. You can sign into that tenant if you have access, or request that the device be removed from Autopilot so you can register it with a different tenant.