Microsoft account recovery code
Applies ToMicrosoft account dashboard

A Microsoft account recovery code is a 25-digit code used to help you regain access to your account if you forget your password or if your account is compromised.

How to get a Microsoft account recovery code

  1. Go to the Manage how I sign in page of your Microsoft account Security dashboard by selecting the button below.​​​​​​​Manage how I sign in

  2. Scroll down to the Recovery code section and select Generate a new code.

    Caution: As soon as you create a new recovery code, any previous codes will no longer work.

  3. Print the recovery code and keep it in a safe place. For security, do not store the code on a device used to sign in to your account.

How do I download my Microsoft account recovery code?

You cannot retrieve or download an existing Microsoft account recovery code:

How to sign in with a Microsoft account recovery code

  1. Start signing in to your Microsoft account by entering your username.​​​​​​​Sign in

  2. If you don't have access to any sign in verification method or have forgotten your password, select Other ways to sign in​​​​​​​.

    Note: Some of the following steps may vary, depending on the level of security on your account, and the range of numbers or email addresses you have added.

  3. Select Use my password then Forgot password?

  4. Select Use a different verification option then I don't have any of these.

  5. At the Do you have an account recovery code? prompt, enter your recovery code.​​​​​​​

    Tip: Recovery codes are not case-sensitive and don't require spaces or dashes.

  6. Once you enter a valid recovery code, you will be given the option to update your password.

    Note: If your account has two-step verification turned on, you must wait 30 days for changes to take effect. Learn more.

Need more help?

Forgotten your Microsoft account username

Contact Support

For technical support, go to Contact Microsoft Support, enter your problem and select Get Help. If you still need help, select Contact Support to be routed to the best support option.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.