You might need to recover your account if you can’t sign in using the provided code. Here’s how to do it:
1. Open your computer’s web browser and visit a specific link.
2. Provide the email associated with your Microsoft account and click “Next.”
3. You’ll receive a security code from Microsoft via email or your linked phone number.
4. Enter the security code and create a new password for your Microsoft account. You’ll need to enter the new password twice for confirmation.
For reference