Do you use two-factor authentication (PIN code with login)?
See this more in depth guide here.
Check to see if IMAP setting is disabled
1. After logging into https://login.microsoftonline.com/ click the cogwheel icon and the top right and select "Mail" link at the bottom.
2. Select "POP and IMAP" from the left hand side
3. Check to see if IMAP setting is disabled. If so, you will need to contain the administrator for your domain and have them enable IMAP.