A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation
This happens when security info is being set up in the wrong order. The code must come from an account that is already added inside Microsoft Authenticator, so the account first needs to be added in the app by scanning the QR code (or entering details manually), and only then will the app show a code that can be typed back into the setup page.
Follow the wizard in this order:
- On the sign-in/security page, start the security info setup (for work/school this is the Keep your account secure wizard; for personal accounts use the Security tab at https://account.microsoft.com/security).
- When prompted to set up Microsoft Authenticator:
- Select Download now to install the Microsoft Authenticator app on the phone if it is not already installed.
- Select Next until the page shows a QR code (for work/school this is the Scan the QR code page; for personal accounts this appears after choosing Use an app and Set up a different Authenticator app).
- On the phone:
- Open Microsoft Authenticator.
- Choose Add account (plus icon or Customize and control → Add account).
- Select Work or school account (for organizational accounts) or Personal account (for Microsoft consumer accounts).
- Use Scan a QR code and scan the QR code shown on the computer.
- If scanning is not possible, choose the option on the computer like Can't scan the QR image / I can't scan the bar code and then use Enter code manually in the app to type the code and URL.
- After the QR code is scanned or the details are entered, the account appears in the Authenticator app and shows a verification code (or starts sending push notifications, depending on method).
- Go back to the setup page on the computer, select Next, and when asked for a code, enter the 6‑digit code now visible in the Authenticator app for that account, or approve the notification sent to the app.
The key is: do not expect a code from the app before the account has been added to Authenticator via the QR code/manual entry step. Once the account is added, the app will generate the code that the setup page is asking for.
References: