Error while Configuring SMTP and IMAP email accounts with Microsoft Office365 using OAuth2

Jayant Pandit
Giga Expert

We are following below document provided by SNOW,

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0816072

IMAP is working fine,

SMTP test connection showing below error.

"Connection Failed
Email sender connection invalid.: Cannot connect to SMTP server: smtp.office365.com"
 
Appreciate your inputs.
 
Thanks
Jayant
1 ACCEPTED SOLUTION

@Nguyen Minh Tam , @Kushal Bahirwani , @Jerry Wong 

Hello Everyone,

I managed to solve this on my own,

below are the steps.

 

Configure your OAuth Profile in Application Registry, Add Entity Scopes.

Create 2 Email Accounts, one for IMAP and another for SMTP.

When you click on "Authorize Email Account" .

Make sure that you are signed in as same email account in the browser that you want to configure for email sending and receiving.

 

For example.

My email ID is 'jayantcpandit@gmail.com'

Email that I want to configure is 'example@example.com'

In this case, I need to sign in to the browser with 'example@example.com' where I click on "Authorize Email Account", not with my 'jayantcpandit@gmail.com'

With this way, it will make sure that you are using correct account to authorize.

 

Hope this helps.

Please mark this helpful, if solves your issue.

 

Thanks

Jayant

View solution in original post

28 REPLIES 28

@dwilborn 

 

Enable Debug logging . 

Please check the Node logs under Node log File browser .

Hope this can help you more with the issue.

 

Did you solve this? facing the same

@avivs @dwilborn - did. you manage to resolve the issue, i am also receving the error now?

@Daniel R2  @avivs 

No, we were unable to resolve this issue.  I've reverted to the ServiceNow provided email host.  Node logs did not provide any additional insight.  I even had ServiceNow support provide instance Splunk logs which we then forwarded to Microsoft support, to no avail.

Laurent Ergen
Tera Contributor

Hi, 

We are facing the same solution, with some SSL related issues in the logs. Anyone succeeded in sending mails with OAuth 2 certificate based authentication? 

We manage to authorize the email account and get a Token, but the connection fails.