by Horatiu Dan
ContextMicrosoft announced that starting October 2022 Basic authentication for specific protocols in Exchange Online would be considered deprecated and turned off gradually and randomly for certain tenants. As insightful details concerning this topic may be found in Resources items 1 and 2, among these protocols there are Exchange ActiveSync (EAS), POP, IMAP, Remote PowerShell, Exchange Web Services (EWS), Offline Address Book (OAB).
Consequently, customer applications leveraging Basic authentication towards Exchange Online as part of their business use-cases need to replace it with Modern authentication – OAuth 2.0 token-based authorization – which no doubt has many benefits and improvements that help mitigating the former’s risks.
The purpose of this article is to document and show-case how a Java based client application can connect to an e-mail server via IMAP (or IMAPS) protocol using the JavaMail library, after p...