After you turn on two-step verification, you may see an error when you sign in to certain apps (like mail apps on some phones) and devices (like Windows Phone 8 and Xbox 360). Because these apps and devices don't support two-step verification, they can't prompt you to enter a security code when you try to sign in.
The solution to this problem is to create app passwords. App passwords are long, randomly generated passwords that you provide only once in place of your regular password when signing in to apps and devices that don't support two-step verification.
You only need to create app passwords if you use two-step verification. For help signing in to your Microsoft account, see When you can't sign in to your Microsoft account.
The steps for generating a new app password are always the same. Repeat these steps to get a different password for every app or device that needs an app password:
Go to the Security basics page and sign in to your Microsoft account.
Select more security options.
Under App passwords, select Create a new app password. A new app password is generated and appears on your screen.
Enter this app password where you would enter your normal password.
The way you enter an app password can be slightly different depending on the app or device you're trying to sign in to. The most common ones are listed here.