A Microsoft account recovery code is an emergency route when you forget a password or lose access to sign-in verification. It is not a replacement for securing your recovery email and phone. Generate it while signed in, then keep it somewhere you could reach without the same account or device.
Prepare the code
- Open your Microsoft account security dashboard from a bookmark or by typing Microsoft's account address. Go to the page for managing how you sign in and locate Recovery code. Choose Generate a new code.
- Record the full 25-digit code accurately and keep it in a secure offline place. Microsoft recommends printing it and not storing it on a device used to sign in to that account. Do not paste it into chat or a support form.
- Understand that creating a new code invalidates the previous one immediately. Destroy or clearly mark any old paper copy so you do not rely on it during an emergency.
- Check that your recovery email, phone and other sign-in methods still work. A recovery code is a reserve, not a reason to remove strong everyday verification.