https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/organization-administration/configure-email
Note: Finance and operations apps don't support multifactor authentication or Modern auth (OAuth 2.0) for SMTP. Administrators might have to re-enable Basic authentication to allow for SMTP AUTH. For more information, see Enable or disable SMTP AUTH. The Exchange mail provider can be used if a more modern integration is desired. Note that the deprecation of Basic authentication for Exchange online doesn't affect the use of SMTP in finance and operations apps, because /SMTP AUTH will still be available when Basic authentication is permanently disabled./
Why Microsoft Dynamics 365 F and O doesn't support modern auth?