'How do I sent email from an ASP.NET web app on Azure using Security Default in Azure Active Directory?
We have an ASP.NET app that is using SmtpClient to send email. It is sending through Office 365. The app is running as an Azure web app. This as been working fine for years.
Now, we want to turn on Security defaults in Azure Active Directory, but when we do so, SmtpClient throws "System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. "
What do we need to change in our ASP.NET application to be able to send mail?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
