Receiving a verification code in a text message is a common verification method for two-step verification. If you didn’t expect to receive a code, or if you received a code on the wrong phone, use the following steps to fix this problem.
Note: If your organization doesn't allow you to receive a text message for verification, you'll need to select another method or contact your administrator for more help.
If you received the code on the wrong phone
Sign in to My Security Info to manage your security info.
On the Security info page, select the phone number that you want to change in your list of registered authentication methods, and then select Change.
Select your country or region for your new number, and then enter your mobile device phone number.
Select Text me a code to receive text messages for verification, then select Next.
Type the verification code from the text message sent from Microsoft when prompted, and then select Next.
When notified that your phone was registered successfully, select Done.
If you receive a code unexpectedly
If you already registered your phone number for two-step verification
Receiving an unexpected text message could mean that someone knows your password and is attempting to take over your account. Change your password immediately and notify your organization's administrator about what happened.
If you 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 message prevents the provider from sending messages to your phone number in the future. You might need to reply to similar messages with different codes.
However, if you're already using two-step verification, sending this message prevents you from using this phone number to sign in. If you want to begin receiving text messages again, reply to the initial text message with START in the body.