Microsoft OutLook Email no more connect with IMAP and SMTP with user/pass

Hi, There
Is there any work around for this, as it is completely not working.
using

IMAP server outlook.office365.com
IMAP port 993
IMAP encryption TLS

Someone please put a light on this?

All I can say is imap and smtp are working here.

can you provide more information form logs, version information, php and server info, etc

It is always saying authentication failed.
it is paid Outlook with the exchange. maybe free working fine.
php 7.4
server ubuntu 20.04

When you go back into the account settings page, after saving, does the setting for TLS/SSL remain in the way that you configured it?

There’s a bug that makes that setting get lost when saving. This then causes authentication to fail.

It has been many different ways, many different types. Directly from code. IT is not working now since this month only. Before that It worked since years.

Even tried with MFA + app password.
Even tried with Exchange.
Even tried on 7.14.1
It seems to not working at anyhow/anycost.

Have you turned on full SMTP log so you can watch the dialogue with the SMTP server? Sometimes this brings more detail to the error.

This is done by uncommenting a few lines I put in the code, there are some forum posts explaining it.