What is a single-use code?

A single-use code is a code you can use instead of your password when you sign in with your Microsoft account. Each code can be used only one time, but you can request one whenever you need it. If you're signing in on a public computer—like at the library or school—using a single-use code helps keep your account information secure.

When you request a single-use code, we send it in a text message to the mobile phone number that you've added to your Microsoft account.*

* Not available in all regions.

To add a mobile phone number to your account

  1. Sign in to your Microsoft account using your email address and password.

  2. On your account page, under Password and security info, click Edit security info.

  3. On the Security info page, select Add.

  4. Select your country code.

  5. Enter your mobile phone number.

  6. Click Save.

To request and use a single-use code

  1. Go to the Microsoft account overview webpage, or any Microsoft website you want to sign in to.

  2. Click Get a single-use code to sign in with.

  3. Click Get one here.

  4. Enter your email address.

  5. Select the location where your mobile number is registered.

    Single-use codes are available only for locations that are listed.

  6. Enter the mobile phone number you added to your account.

  7. Click Send text message.

    You'll receive a text message with your single-use code. SMS delivery is subject to network delays, so it might be a few minutes before you receive your code.

  8. After you receive the code, enter it in the Single-use code box, and then click Sign in.


  • Your single-use code expires as soon as it is used. To sign in again with a single-use code, you'll need to request a new code.

  • If you've waited more than 15 minutes and haven't received the code, try requesting another code.

  • If your code doesn't work, request a new code. If you've requested more than one code, use the most recent one.

  • To prevent abuse of Microsoft services, we limit the number of times you can request a code each day.