

Then, you can either wait for the token to be refreshed after it expires, or run the following command to force it to refresh immediately: Set-User -Identity -STSRefreshTokensValidFrom $(::UtcNow) To re-enable Basic authentication for these protocols, run the following PowerShell command: Set-AuthenticationPolicy -Identity -AllowBasicAuthPop -AllowBasicAuthImap -AllowBasicAuthSmtp If you previously disabled Basic authentication for POP or IMAP by using an Exchange Online authentication policy, you can change the policy to allow these protocols. Enable Basic authentication for POP and IMAP protocols To do so, disable Azure Active Directory security defaults if they are enabled. If you're using POP/IMAP and SMTP for an Exchange Online account in Outlook, you must enable Basic authentication for these protocols (until it's permanently deprecated in October 1st). There is no plan for Outlook clients to support OAuth for POP and IMAP, but Outlook can connect use MAPI/HTTP (Windows clients) and EWS (Outlook for Mac). It's also documented in Deprecation of Basic Authentication in Exchange Online: This is because Outlook supports Modern authentication only for Exchange profiles (MAPI/HTTP and EWS),, and Gmail at this time. If you've disabled Basic authentication, and you're trying to configure an Outlook profile by using POP and SMTP or IMAP and SMTP, you will notice that Outlook neither connects nor authenticates.

Also, tenants are encouraged to disable Basic authentication, and move to a Modern authentication tenant for modern clients. Microsoft recently announced the Exchange Online capability to use OAuth authentication for POP and IMAP and SMTP protocols.
