Microsoft finally published access to Office 365 IMAP server using OAuth 2.0 authentication. We had to enable a workaround for it that we had made for other Microsoft IMAP server on Outlook.com.
Another related forum thread on this issue can be found here: https://forum.rebex.net/12653/does-rebex-support-office-mailbox-using-imap-with-oauth-token
Trial hotfix version that makes it possible to connect to Office 365 IMAP server can be downloaded here:
Full version of this hotfix is for available for paying customers at email@example.com as part of their support contract.
Update: This workaround has been released with Rebex Secure Mail 2020 R3.
Update: We published a blog post that describes how to login with OAuth 2.0 to Office365 with Rebex Secure Mail, and another one that describes how to register application for with appropriate permissions in Azure.