Symptom: Your company has enabled two-factor authentication on your Office 365 and now your Apple email nor calendar are working with your company email system.
Note: Outlook app on the iPhone uses your Office password and your authentication code and saves it.
That's because Apple and any app that can't handle the request for authentication code. So Microsoft came up with the app password. You can't go back and see what is initially created. But you can create another one.
Log into https://outlook.office.com
Click on the Settings button (to the left of Your Name in upper - looks like a wagon wheel).
Then scroll to bottom, click on Office 365 below Your App Settings.
It will open a new page, click on Security & Privacy on left side of screen.
Then Additional Security verification to the right
Then click on Update your Phone numbers used for account activity which will be just below that.
It will open a new page, click on App Passwords – to right of additional security verification
Click Create. It may ask you for a name – just use Outlook.
You will want to copy and secure it as you will use for Outlook and any other email app you use.