If you connect your Microsoft Account to a Microsoft app with two-factor authentication turned on, you'll be able to use an app like Microsoft Authenticator to generate a code to allow you to log in. But, if you're attaching something like your email to a third-party client, or older services not supported by two-factor authentication like your Xbox 360, this might not be possible. You'll need a special password generated by your account security settings to log in.
It's really easy to get one, and here are the steps you need to know.
- Follow this link to access your Security settings on your Microsoft Account and sign in with your credentials.
Under App passwords, click the Create a new app password link.
On the app or device make sure to update the password with the new one.
- Repeat the previous steps to create an app password for each device.
Keep in mind that if you happen to forget the app password, there isn't a way to retrieve it, you'll need to create a new one. If you want to stop using app passwords, simply go back to the Security settings page, and click the Remove existing app passwords link.
That's all there is to it. Now you'll be able to log into any service with your two-factor protected Microsoft account!