Share via

Microsoft 365 Security Info Error

Anonymous
2020-09-10T16:54:02+00:00

When I used my 365 account to navigate to page: https://mysignins.microsoft.com/security-info

It shows the following error: 

An unexpected error has occurred

And also I could not use email in .NET applications to send emails automatically which I suspect it has something to do with this error too:

"SmtpConfig": {

        "FromEmail": "******@exampledomain.com",

        "FromEmailDisplayName": "....",

        "EnableSSl": "true",

        "Host": "smtp.office365.com",

        "Password":"...."

        "Port": "587",

        "UserName": "******@exampledomain.com"

      }

using (var client = new SmtpClient())

                {

                    var config = smtpConfig;

                    if (config.EnableSSl)

                        client.EnableSsl = true;

                    client.Host = config.Host;

                    client.Port = config.Port;

                    client.DeliveryMethod = SmtpDeliveryMethod.Network;

                    client.Credentials = new NetworkCredential(config.UserName, rootConfig[config.PasswordConfigurationName]);

                    client.UseDefaultCredentials = false;

                    await client.SendMailAsync(message);

                }

Error message:

System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [ME2PR01CA0057.ausprd01.prod.outlook.com] at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location where exception was thrown --- at

Any suggestions?

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2020-09-11T13:57:15+00:00

Hi Raymond Tang,

Thanks for your post with above details. I just tested this on my side and I can access the site you mentioned without any errors, please see: 

Given this result, please kindly try it again with a different browser and the browser's InPrivate mode to see if there is the same result.

Moreover, about the problem that you cannot use email in .NET applications to send emails, based on the information you shared, you are using the option 1 SMTP client submission as described in below picture, right?

Option 1 (recommended): Authenticate your device or application directly with a Microsoft 365 or Office 365 mailbox, and send mail using SMTP AUTH client submission

If so, please kindly refer to the article I shared above to make sure you have correctly set up your .NET application to send emails via SMTP client Submissio.

Also, based on the error message, you need to check if you have entered the correct credentials in your .NET application.

Moreover, please make sure you have assigned a license to the mailbox that you used to send emails, also, make sure you didn't enable MFA for this account. Besides, your device must be able to use TLS version 1.2 and above.

Best regards,

Jennifer

Thanks I resolved both issues by using the following approach:

  • Turn off Modern authentication and turn it on.
  • Turn on Modern authentication but untick 'Authenticated SMTP' Used by ‎POP‎ and ‎IMAP‎ clients to send email messages.'
  • Tick user mailing app settings 'Authenticated SMTP'
  • In Modern authentication, tick 'Authenticated SMTP' Used by ‎POP‎ and ‎IMAP‎ clients to send email messages.'

So for some reason I have to repeat these steps to make everything work.

And literally I only changed user email setting for 'Authenticated SMTP'

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-09-13T01:43:04+00:00

    Hi Raymond Tang, 

    Glad to hear that you have resolved both issues, we appreciate your kindly sharing of the solution you found, it will help other community members who also encountered this issue in the future.

    Wish you have a nice day :-)

    Best regards,

    Jennifer

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-09-10T19:13:25+00:00

    Hi Raymond Tang,

    Thanks for your post with above details. I just tested this on my side and I can access the site you mentioned without any errors, please see: 

    Given this result, please kindly try it again with a different browser and the browser's InPrivate mode to see if there is the same result.

    Moreover, about the problem that you cannot use email in .NET applications to send emails, based on the information you shared, you are using the option 1 SMTP client submission as described in below picture, right?

    Option 1 (recommended): Authenticate your device or application directly with a Microsoft 365 or Office 365 mailbox, and send mail using SMTP AUTH client submission

    If so, please kindly refer to the article I shared above to make sure you have correctly set up your .NET application to send emails via SMTP client Submissio.

    Also, based on the error message, you need to check if you have entered the correct credentials in your .NET application.

    Moreover, please make sure you have assigned a license to the mailbox that you used to send emails, also, make sure you didn't enable MFA for this account. Besides, your device must be able to use TLS version 1.2 and above.

    Best regards,

    Jennifer

    Was this answer helpful?

    0 comments No comments