Change how you get 2-step verification codes
Sign in to Office 365 using your password and verification code.
From the upper-right corner of the Office 365 window, select your account name and then select View account > Update contact preferences.
From the My account page, choose Security & Privacy > Additional security verification.
Choose Add or change your security verification settings > Update your phone numbers used for account security. This will display the following page:
Choose how you want to get your verification code
Follow the prompts on the page.