Most modern applications support Multi-Factor Authentication, however, if you use an application that don't support Office 365 MFA you can setup an application password to use with that application. An app password will be generated for you when you initially setup MFA for your account, however, it is recommended that you setup a separate app password for each device that requires one. The steps to setup an app password are provided below:
Sign in to Office 365 using your password and verification code.
Choose Settings > Office 365.
Choose Security & Privacy > Additional security verification.
Choose Update my phone numbers used for account security. This will display the following page:
At the top of the page, choose app passwords.
Choose create to get an app password.
Choose copy password to clipboard. You won't need to memorize this password.
TIP: If you create another app password, you'll be prompted to name it. For example, you might name it "Outlook."
Go to the app that you want to connect to your Office 365 account. When prompted to enter a password, paste the app password in the box.
You'll need to do these steps once.
Open Outlook, such as Outlook 2010, 2013, or 2016.
Wherever you're prompted for your password, paste the app password in the box. For example, if you've already added your account to Outlook, when prompted paste the app password here:
Or, if you're adding your Office 365 account to Outlook, enter your app password here: