Every time you sign in to an untrusted device while you have two-step verification turned on, you'll get a security code in email or on your phone, making sure you’re you. If you've turned off two-step verification, you'll get and resend security codes periodically, along with any time there's a risk to your account security. If you don't want to use email, a phone call, or text, you can use the Microsoft Authenticator app to help strengthen your account security and to sign-in without passwords. To turn two-step verification on or off:
Go to Security settings and sign in with your Microsoft account.
Under the Two-step verification section, choose Set up two-step verification to turn it on, or choose Turn off two-step verification to turn it off.
Follow the instructions.
Note: Before you turn on two-step verification, make sure you've associated at least three unique security contact email addresses or phone numbers with your account for backup purposes. If you lose your security info and you don't have a backup contact method available, you can permanently lose your account.