Office 365: OAuth 2.0 IMAP, POP3 email client connectivity tools
To assist IT managers in resolving Office 365 connectivity issues, Microsoft offers a web-based connectivity analyzer. It works with POP3 or IMAP clients and OAuth 2.0:
Test IMAP access:
Test POP3 access:
Those tools test IMAP and POP3 connectivity only – remember that application in your AD must be properly configured.
You need to choose and implement one of the available OAuth 2.0 flows: