This problem can occur in the following scenario:
- The device object is moved to another organizational unit (OU) that isn't in the sync scope in Azure AD Connect Sync.
- Azure AD Connect Sync recognizes this change as the device object being deleted in the on-premises Active Directory. Therefore, it deletes the device in Azure AD.
- The device object was moved back to the OU in the sync scope.
- Azure AD Connect Sync creates a pending device object for this device in Azure AD.
- The device fails to complete the device registration process because it was registered previously.
To fix the problem, unregister the device by running dsregcmd /leave
at an elevated command prompt, and restart the device. The device will reinitiate the device registration process through the scheduled task. For Windows 10-based devices, the scheduled task is under Task Scheduler Library > Microsoft > Windows > Workplace Join > Automatic-Device-Join Task.
https://learn.microsoft.com/en-us/troubleshoot/azure/active-directory/pending-devices
Thanks
Ajinkya Ghare
If my reply helped, please mark it as helpful,
If it fixed your problem, please mark it as the answer