The error was resolved this way:
The device is already enrolled 8018000a
Hello community.
I previously created a question, but it no longer matches the problem and I would like to rephrase and ask a new question.
We use the Provision Package to join the on-prem device to Azure AD.
The problem is that the device immediately deletes itself as soon as it joins AAD.
If you try to add a device manually, an error occurs:
Error 8018000a: “Something went wrong. The device is already enrolled. You can contact your system administrator with the error code 8018000a.
We migrated some devices earlier (test). We did NOT have problems if we used the ISO downloaded from Microsoft. And we had problems with devices on which the system is installed from a different ISO.
We made SYSPREP
"%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe" and right after that the device connected (Provision Package worked).
The essence of the problem: we have almost all devices installed with an ISO with which there is a problem. It's very hard to sysprep during migration. The entire migration process is fully automated.
I would like to know what needs to be changed in the system so that such a problem does not arise? Which system ID is critical during device join, how does Azure AD determine which system is added and which is not? Is it possible to use a simple script to fix this?