Thank you for asking this question on the Microsoft Q&A Platform.
According to this thread
You can follow the steps below:
- Remove the computer from the local domain.
- Remove the registered computer from Azure.
- Remove all accounts under settings->accounts->access work or school.
-
- Remove all GUID keys from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments (GUID keys look like 18DCFFD4-37D6….)
- Join the machine to your Domain
Hope this helps!
Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
NOTE: To answer you as quickly as possible, please mention me in your reply.