2FA Code Generator › Guides › Microsoft account 2FA

Microsoft Account 2FA: Two-Step Verification Guide

By Md Rasel Mahamud · Last updated:

Reviewed for accuracy by the 2FA team

Your Microsoft account signs you in to Outlook, OneDrive, Xbox and Windows. Two-step verification makes it much harder for someone with your password to get in. Here is how to turn it on and use an authenticator code.

Published 30 November 2026

How to turn on two-step…Add an authenticator app and…Get your Microsoft code in the…Recovery optionsOlder apps and devicesFAQ

How to turn on two-step verification for a Microsoft account

Microsoft's support pages describe these steps for personal accounts:

  1. Sign in at account.microsoft.com/security.
  2. Select Manage how I sign in.
  3. Under Additional security and Two-step verification, choose Turn on.
  4. Follow the on-screen instructions.

Menu names can change over time. If a step looks different, search the service's official help pages for "two-factor authentication".

Add an authenticator app and setup key

In the same sign-in settings you can add a way to verify with an app. Microsoft usually suggests its own Microsoft Authenticator app, which shows a QR code for you to scan. Microsoft accounts also accept codes from other standard authenticator apps:

  1. Choose to add a new way to sign in or verify, and pick the app option.
  2. If you want to use another authenticator, look for the option to set up a different authenticator app.
  3. When the QR code appears, look for a link to show the key as text if you cannot scan it, and save the key.
  4. Add the key to your authenticator or the online 2FA code generator, then enter the 6-digit code to confirm.

The exact wording of these options depends on your account and may change.

Get your Microsoft code in the browser

  1. Open the 2FA code generator in a new tab.
  2. Paste the Microsoft key into the box, or click Scan QR or the upload button to read the QR code.
  3. Your 6-digit Microsoft 2FA code appears instantly, with a countdown to the next code.
  4. Copy the code and enter it in Microsoft before the timer runs out.

People sometimes search for "Microsoft Authenticator online". Microsoft Authenticator is Microsoft's own mobile app; our 2FA code generator is a separate, independent web authenticator that uses the same open TOTP standard. We are not affiliated with Microsoft.

Recovery options

Before you rely on two-step verification, make sure your account has up-to-date security info, such as a backup email address or phone number. Microsoft also offers a recovery code for personal accounts in the security settings. If you are shown one, write it down and keep it offline. It can help you get back in if you lose your verification methods.

If you get locked out, use Microsoft's official account recovery form from the sign-in page. See how to recover a 2FA account for general tips.

Older apps and devices

Some older apps and devices cannot show a two-step verification prompt. For those, Microsoft uses app passwords. If an older mail app stops signing in after you turn on two-step verification, check Microsoft's help pages about app passwords.

Frequently asked questions

How do I turn on 2FA for my Microsoft account?
Sign in at account.microsoft.com/security, select Manage how I sign in, and under Two-step verification choose Turn on. Then follow the on-screen steps.
Can I use an authenticator other than Microsoft Authenticator?
Yes. Microsoft accounts accept codes from standard TOTP authenticator apps. Choose the option for a different authenticator app during setup to get a QR code and key.
Where is my Microsoft setup key?
It is shown during authenticator setup, next to the QR code, usually behind a link for when you cannot scan the code. Save it at that time.

Ready to get your 2FA code?

Paste your secret key or scan a QR code – free, private and instant.

Open the 2FA Code Generator