Eyeballing EwsConnector.py, it does not appear that Synapse allows the use of OAuth2Credentials.
Microsoft is steadily shutting down use of BASIC auth to O365:
https://developer.microsoft.com/en-us/office/blogs/deferred-end-of-support-date-for-basic-authentication-in-exchange-online/
Has anyone worked out a long-term way to use Synapse to access O365 mailboxes?