It is possible to Set an Inbound and Outbound Emails with 2 Factor Aunthentication?

Hi everyone,

I want to connect an email account with sugar to use as an Inbound and Outbound email through SugarCRM. The email account is an MS 365 Business Basic with a Two-factor authentication (2FA). Is there a way to connect it?