After wiping a Windows10 Autopilot device from Microsoft Endpoint Manager, we got welcomed to the correct tenant by name and logo. When signing in with a current licensed user, we got the message saying "That username looks like it belongs to another organization. try signing in again or start over with a different account". Time to troubleshoot!
The background for the wipe was to repurpose the device for a new user.
The error message looked like this on Windows 10 and Windows 11 after trying to upgrade.
In order to search the problem I hit <shift>+<F10> to open CMD. By running the hostname command, I noticed the assigned computer name from Autopilot was wrong. The wmic bios get serialnumber command gave me the serial number to check in autopilot devices in MEM. A check told me that the device was present in the Tenant it was supposed to be. I did a check in regedit under the path HKLM\SOFTWARE\Microsoft\Provisioning\Diagnostics\AutoPilot and found some foreign values pointing me in the direction of an old tenant which this user/device previously was a part of. The company was earlier on migrated completely to the new tenant as part of a larger merge of companies.
The old tenant was still present, but the serial number was not found in Autopilot devices on that tenant. The Autopilot device list was empty. A check of devices in Azure AD did however list the device as an autopilot device!
|Device serial not found in Windows Autopilot devices on old tenant|
|Device serial not found in Windows MEM devices on old tenant|
|Device serial not found as Autopilot devices in Azure AD Devices on old tenant!|
As a next thing to test, I deleted the serial number from Windows Autopilot devices on the new tenant where the device was expected to be. A new hardware hash was captured from the device and uploaded to the this new tenant. This gave the error code "808 – ZtdDeviceAssignedToOtherTenant"!
A new import of the CSV file containing the hardware hash was now successful, and the correct deployment profile got assigned
I did initiate a new factory reset from the CMD prompt on the device with the command systemreset --factoryreset. After the device was reset and rebooted, the Autopilot onboarding routine went as expected!
Summarize the cause
- The device was actually listed as an autopilot device in the new tenant.
- The device did actually welcome me with the name and logos from the new tenant.
- the new tenant do allow personally owned devices to be onboarded
- the deployment profile is assigned to a dynamic group collecting all Windows 10 devices
- the deployment profile has the check set for converting all targeted devices to Autopilot
- the user was administrator on the device in the old tenant