Good afternoon.
Implemented a connection to IMAP/SMTP through the specified XOAuth2 authorization protocol.
Using the example of mail
mybroker@univer.ua on the univer.1b.app project, integration with mailboxes was connected - the Mail application displays the mailbox, mail is sent, etc.
You can view an example of creating an application and configuring it in the corresponding Azure Active Directory account.
PS: in 1b, when specifying accesses (you can see an example in the indicated mail), there is a transition to authorization in microsoft via OAuth2.