Try this:
Open the command prompt as an administrator
Enter dsregcmd /forcerecovery (You need to be an administrator to perform this action).
Click “Sign in” in the dialog that opens up and continue with the sign in process.
Sign out and sign in back to the device to complete the recovery.
https://docs.microsoft.com/en-us/azure/active-directory/devices/faq