And the official document here about How to set up a multifunction device or application to send email using Microsoft 365 or Office 365 If the response is helpful, please click "Accept Answer" and upvote it.
With Microsoft 365 accounts, the 'Authentication Unsuccessful' error can occur when a Microsoft 365 user tries to send emails whilst IMAP is selected as the server type. This problem occurs because SMTP authentication is blocked by default for security reasons inside Microsoft 365's settings by any company making use of it.
The error usually occur when SMTP is not enabled in Office 365 for the affected. However, we have seen this happen even when SMTP is enabled. A simple fix is to simply untick SMTP Authentication for the account in Office 365 and then re-enable it again. Give it 10 mins for the changes to apply and your SMTP should start working again.
I don't know whether the unsuccessful SMTP authentication is caused by a mis-configuration of Microsoft 365 or a problem in the protocol dialogue. I'm using the Microsoft 365 Developer Subscription provided as a benefit of my MSDN subscription.
In my case the policy was called Block Legacy Authentication, and I'm not sure if this is a default policy or something we added, but it was blocking pop/imap/smtp authentication for all lof our mailboxes and the fix was to exclude the mailboxes we want to use for SMTP auth, then in Office 365 admin portal > active users > select mailbox > mail > mail apps we enabled the SMTP Authentication setting for that mailbox.
Use the Microsoft 365 admin center to enable or disable SMTP AUTH on specific mailboxes. Open the Microsoft 365 admin center and go to Users > Active users. Select the user, and in the flyout that appears, click Mail. In the Email apps section, click Manage email apps. Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.
Support » Plugin: Post SMTP Mailer/Email Log » Office 365 ... The topic ‘Office 365 – 5.7.3 Authentication unsuccessful’ is closed to new replies.
This has nothing to do with Angular's MSAL libraries. The problem is that your Office 365 account's SMTP authentication is disabled. To authenticate your Office 365 account, the third-party application employs SMTP submission. You can use the instructions below to activate SMTP authentication.