I currently use gmail and a google apps account from my college, but the last one doesn't work properly, due to the lack of support for OAuth2 authentication for IMAP accounts. It's really a funny thing, since the GData plugin does indeed work fine using that same authentication (I use it with my gmail).
The company I work for changed the authentication to use MFA for Microsoft Exchange accounts. This change included that the IMAP server now supports only XOAUTH2.
The client log:
[17:15:17] IMAP> 1 CAPABILITY
[17:15:17] IMAP< * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
[17:15:17] IMAP< 1 OK CAPABILITY completed.
It looks like it says it allows plain but this seems to be wrong.
So XOAUTH2 support is needed to login.