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.