When performing two-step verification using a mobile phone, you can choose to receive a numeric code via text message as one verification factor. If you received this code on the wrong phone or you didn’t expect to receive this code, please use the following steps to fix this problem.
Change the phone number that you use for verification
Sign in with your Microsoft account to Security.
Select Advanced security options.
Under Ways to prove who you are, find the phone number you wish to change in your list of registered authentication methods, expand the section, and select Remove.
From the new windows, select Remove to confirm that you want to remove that phone number.
Under Ways to prove who you are, select Add a new way to sign in or verify.
Select Show more options and then select Text a code.
Tip: If you have a smartphone, consider using an app instead for a faster and more secure sign in experience. See How to use the Microsoft Authenticator app
Select your country or region for your new number, enter your mobile device phone number, then select Next.
Type the verification code from the text message sent from Microsoft when prompted, and then select Next. You’ll be notified that your phone was registered successfully.
If you receive a text message unexpectedly
If you previously set up two-step verification to go to your mobile device
This could mean that someone knows your password and is attempting to take over your account.
Open a browser and sign into your account and change your password immediately.
If you’ve never registered your phone number for two-step verification.
You can reply to the text message with “STOP” in the body of the text message. This will prevent the provider from sending messages to your phone number in the future. You may need to do this a few times to fully stop receiving messages.
However, if you're a valid user of two-step verification, this will prevent you from using this phone number to sign in. To begin receiving text messages again, for each number to which you replied “STOP”, reply to the initial text message with “START” in the body.