We attempted supporting SMTP authentication via OAuth2 token since Microsoft is deprecating Basic Auth. However, Microsoft doesn't support this approach for non-interactive use cases, like sending email notifications. As noted in this Microsoft ticket and confirmed by their representative, we will need to use Microsoft's Graph API instead. This Issue focuses on implementing that approach.
Spec
Issue
Harvest: LabKey R&D - Client Requested Improvements - Issue 53534: Support Microsoft's Graph Protocol API for authentication via OAuth2 token
Tasks: