The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Error while Configuring SMTP email account with Microsoft Office365 using OAuth2

Daniel R2
Kilo Sage

Hi, 

We are currently Configuring an SMTP email account with Microsoft Office365 using OAuth2. However once we authorize the email account then test the connection, we get the following error: "Error: Connection Failed Email sender connection invalid.: Cannot connect to SMTP server: smtp.office365.com, as: <M365 Email as configured in "User name" field>, message: failed to connect". 

We are able to authorize, its just we get an error when testing the connection.

 

If i can kindly ask not to send links to the other documents/KB articles regarding this same issue, as we have been through almost every community post relating to this and there isnt any solution that has helped us to resolve.

It is apparently a known error, where we should check the mailbox has an E5 license, we have checked and it does, however we are sitll getting the error. 

Can anybody please provide their support on how this error can be solved? 

I have attached a screenshot of the email diagnostics where the processing time is red.
It also provides a message saying "glide.email.test.user property is configured to send all outbound email to the email address servicenow-dev@*********.com."

Could this be what is causing the error? do we need to remove the email address from the glide.email.test.user property ('Send all email to this test email address (non-production testing)' field in email properties)

Any help or guidance is appreciated. Thanks in advance

1 ACCEPTED SOLUTION

@Les1 - We have only just resolved the issue this morning, and we are monitoring until tomorrow. Hopefully, our solution will help you.


The issue we were facing was that we needed to enable the authenticated client SMTP submission (SMTP Auth) in Exchange Online for the email account we were setting up. Please follow the below link for instructions on how to enable it, you will need your Mail Admin/Exchange admin to action this. Once you enable this, we set up the email accounts again and it was working as we wanted. We could see it operational in the email diagnostics, we got successful test connections and we could also see emails being sent in the email logs.


Please note: We did previously enable this, however the client had a daily script running that would revert the change and disable the SMTP auth for the mailbox, So the exchange/email admin has added the email account as an exclusion. So may be this is something you could also keep in mind to check.

We havent implemented to Prod yet, as we have just been testing that the functionality works with a test email account. However when we have set up the email accounts on the 2 subprod environments. We had to disable it on Development for it to then be successful on Test. 

View solution in original post

4 REPLIES 4

Les1
Tera Guru

Did you find resolution? we've got a similar issue on a subprod instance though our prod is working fine.

@Les1 - We have only just resolved the issue this morning, and we are monitoring until tomorrow. Hopefully, our solution will help you.


The issue we were facing was that we needed to enable the authenticated client SMTP submission (SMTP Auth) in Exchange Online for the email account we were setting up. Please follow the below link for instructions on how to enable it, you will need your Mail Admin/Exchange admin to action this. Once you enable this, we set up the email accounts again and it was working as we wanted. We could see it operational in the email diagnostics, we got successful test connections and we could also see emails being sent in the email logs.


Please note: We did previously enable this, however the client had a daily script running that would revert the change and disable the SMTP auth for the mailbox, So the exchange/email admin has added the email account as an exclusion. So may be this is something you could also keep in mind to check.

We havent implemented to Prod yet, as we have just been testing that the functionality works with a test email account. However when we have set up the email accounts on the 2 subprod environments. We had to disable it on Development for it to then be successful on Test. 

jayr
Tera Contributor

Hey Daniel,

You mention a link for instructions on how to enable this setting, do you happen to have that link? 

 

Thanks!