POP3, IMAP, SMTP, and MAPI are all protocols that are used in password spraying attacks. Disabling basic authentication of these protocols and requiring modern authentication will reduce your risk of password spraying success. Be mindful disabling basic authentication should be done in piecemeal and tested thoroughly to avoid major disruptions.
You will read that creating a AuthenticationPolicy for your users is the most efficient method to deploy, but it may take up to an hour to apply or remove these policies, so be careful and test and test again.
A great way to decrease your Office 365’s tenants chance of being hacked is to disable they protocols:
$Session = New-PSSession -ConnectionUri https://outlook.office365.com/powershell-liveid/ -ConfigurationName Microsoft.Exchange -Credential $credentials -Authentication Basic -AllowRedirection
# this will bring in all the commands from your session to your local session, you could also use invoke-command -scriptblock to run inside the psession session, I like the import-session better. import-pssession $session get-casmailbox | select-object Identity, PopEnabled,ImapEnabled,MapiEnabled,SmtpAuthenticationEnabled} | Out-GridView
Next would be to create a for loop to disable all these accounts. I will post this part later.
Regarding Basic and Modern authentication policies:
Here’s a create Microsoft article for viewing, creating, and assigning new Modern authentication policies:
https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/disable-basic-authentication-in-exchange-online