Creating an app specific password
If you see an “incorrect password” error on an app or device after you turn on two-step verification, but you’re sure your password was correct, that means you'll need an app password for that app or device.
To get an app password
Go to the Security settings page, and sign in with your Microsoft account.
Under App passwords, click Create a new app password. The new, unique app password will appear on your screen.
In the app or device you’re trying to use, enter that new app password instead of your regular password.
App passwords are only necessary if you use two-step verification. If you don't see the App passwords section on the Security settings page, you may not have two-step verification turned on.