By default, modern authentication isn't enabled in Exchange Online, but you can enable it.
Enable modern authentication in Exchange Online
1. Connect to Exchange Online PowerShell.
2. Run the following command in Exchange Online PowerShell:
Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
3. To verify that the change was successful, run the following command in Exchange Online PowerShell:
Get-OrganizationConfig | Format-Table -Auto Name,OAuth*