If you're having issues connecting to Office 365, here are the three most common things to check.
1) Two-Factor Authentication
-Do you use a PIN code to login? If so, see this guide for more information here.
2) IMAP Settings
-Check to see if IMAP is enabled under your account settings.
3) Ask Your Network Administrator
-Reach out to your email provider or work admin/IT to determine if IMAP is enabled on your account.