An app password is a code that gives an app or device permission to access your Office 365 account. If your admin has turned on multi-factor authentication for your organization, and you're using apps that connect to your Office 365 account, you'll need to generate an app password so the app can connect to Office 365. For example, if you're using Outlook 2016 or earlier with Office 365, you'll need to create an app password.
Check whether your Office 365 admin has turned on multi-factor authentication for your account. If they haven't, when you try to do these steps you won't see the options in Office 365.
Sign in to Office 365 with your work or school account with your password like you normally do. After you choose Sign in, you'll see this page:
Choose Set it up now.
Select your authentication method and then follow the prompts on the page. Or, watch the video to learn more.
After you verify your alternate contact method, choose Next.
You'll get an app password that you can use with Outlook, Apple Mail, etc. Choose the copy icon to copy the password to your clipboard. You won't need to memorize this password.
To create another app password
Sign in to Office 365 and go to the My Account page.
Choose Security & Privacy > Additional security verification. You'll only see this option if your admin has set up multi-factor authentication for your organization. If you don't see this option, contact your Office 365 admin and tell them to turn on multi-factor authentication.
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.
If prompted, type a name for your app password, and click Next.
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.