Microsoft recently added Basic Authentication settings to the Microsoft 365 admin center (Roadmap). You can now quickly disable/enable Basic Authentication per protocol:
Login to https://admin.microsoft.com and go to “Settings” and “Org settings”:
Next, click on “Modern authentication” and you can see the configuration options like this:
More information on Basic Authentication, how to use Graph API or OAuth2 for POP and IMAP protocols, also how to use the Exchange Online v2 PowerShell module with Modern Authentication can be found here.