Error when creating a new email in configurations (office365)

I’m having some trouble when creating a new email account.

In my office365 I can see all erpnext attempts to login, but I’t always return frappe.email.doctype.email_account.email_account.InvalidEmailCredentials:
But I’ve already checked the login and password

How can I login with my office365 account?