Server LOGIN failed

I’m new to eM Client, and can’t get it to work. I keep getting the message Server says “LOGIN failed”. Later I got 5.7.57 Client not authenticated to send mail. BL1PR13CA0017_namprd13_prod_outlook_com

But my email address and password are correct, and my server settings are the same as I use in Thunderbird.
Incoming: IMAP type, outlook_office365_com, port 993.
Outgoing: smtp_office365_com, port 587.

(In this post I had to substitute underline characters for dots, so the forum won’t treat them as links and tell me I can’t post them.)

In Thunderbird I use SSL/TLS for incoming and STARTTLS for outgoing, and OAuth2 for both. I don’t see those options in eM Client, so I tried all 4 Security policy options instead.

You may be using a username/password login. The best option is to remove the account from eM Client, then add it again by selecting the Add Account button, and entering the address in the automatic setup. This will configure the account correctly, with oAuth.

Thank you! That worked. I immediately got a Microsoft pop-up asking if I wanted to give permissions to eM Client, and then another pop-up asking if I wanted to “always allow https://login_microsoftonline_com to open com_emclient_mailclient links,” which I accepted.