Hello @Aholic Liang-MSFT
I am getting the same error even after following the steps suggested by you. Kindly help me on this.
Regards,
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
we are currently trying to connect/authenticate to the Smtp server as an application, so without user interaction.
But we get an error 535: 5.7.3 Authentication unsuccessful when trying to authenticate with OAuth2 access token with our Smtp client.
Our permission are:
We added the mail account to the Service-Principal of our appliction.
For the access token request we send
{
grant_type: "client_credentials",
client_id: xxxxxxxxxxxxxx,
scope: "https://outlook.office365.com/.default",
client_secret: xxxxxxxxxxxxxx,
}
to the https://login.microsoftonline.com/TenantID/oauth2/v2.0/token.
We succesfully receive a token and after connecting to outlook.office365.com with MailKit when we try to authenticate we receive 535: 5.7.3 Authentication unsuccessful.
We have activated SMTP AUTH for our email account:
We also unchecked the "Turn off SMTP AUTH protocol for your organization" at the Mail flow settings.
Is there any additional setting that needs to be configured so we can authenticate as an application without a user involved?
Are there any documentation that describe how to achieve this?
Hello @Aholic Liang-MSFT
I am getting the same error even after following the steps suggested by you. Kindly help me on this.
Regards,
Hi @Thanh Ngo ,
535: 5.7.3 Authentication unsuccessful
For this error, on the Exchange online side, in addition to enabling authenticated SMTP submission, please check the following points:
1.Disable Multi-Factor Authentication (MFA) on the licensed mailbox that's being used:
2.Disable Azure security defaults
3.Check if you have set to exclude users in Conditional Access policies that block legacy authentication
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread