I used to be able to do it. Then something changed, I think it was Aquamail as my organization's email system remained the same. Now you cannot use IMAP with OATH2 for Office 365. The only program that I know that will still do it is Thunderbird, but that's for desktops. If you want better performance with your configuration, switch to native Android email, Outlook, or perhaps Nine. I have raised this issue on multiple occasions with Aquamail, a program I adore, but the developers don't seem to care.