No emails are received with Email account Type IMAP Authentication OAuth2.0 even when Test Connection is successful.

sonalin
Tera Expert

Changing email protocol for an helpdesk@company.com to Modern Authentication to have OAuth 2.0 Email Authentication Type IMAP and SMTP. 

The following steps are completed as mentioned per the KB Article on the non-production UAT instance.

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

1. The email id helpdesk@company.com is used as an Inbound and Outbound from one of the Emails Account was previously using Basic Authentication.
2. The Application Registry "Servicenow Training OAuth" details configured with co-ordination with Microsoft Team.
3. The OAuth Entity Profile, Outh Entity Scope is been setup and configured as per the Microsoft Team instructions.
4. After Clicking "Authorize Email Account Access" to obtain the access and refresh tokens, the Token is been available over the Email Accounts. for IMAP and SMTP protocols.

5. The Connection test of the set email account is successful for IMAP and SMTP.

find_real_file.png

However no Inbound Email is received in logs and even when the SMTP emails are in sent-retry state and some unidentified entries.

find_real_file.png

Appreciate if some would guide me where I could check the emails and what is the staging table of emails which are not getting pulled by OAuth 2.0 in the Email logs and the one that are failing to get send. 

Thanks,

Sonali.

15 REPLIES 15

KoenHaemels
Tera Contributor

Hi

We've had the same issue.
The solution that did work for us was to remove the POP3 configuration under "Email Accounts" and add a new IMAP config. After the token authorized, it started working again.

JTisbury
Tera Contributor

Having the same issue, anybody found a solution. Running out of time to get this resolved.

BelenDB
Tera Contributor

Hi!

 

We were able to fix the issue in our instance... we were having a successful connection but an error in the logs: "BAD User is authenticated but not connected".

 

The problem was due to a corrupt token saved in ServiceNow side the first time we tested the connection.

Apparently, removing the token and generated it again resolved the issue.

 

Best regards

 

 

Facing same issue, how have you removed the token ?

You mean to delete it from System OAuth - > Manage Tokens ?

And then Test the connection again will regenerate it !

 

I have tried doing above, but still getting the same error in logs (AD User is authenticated but not connected). Please help.

JonMS
Tera Expert

I'll add my .02 to this. For people in the future, our issue was the same. Solution was disabling DUO on the email account. You can verify by testing the credentials from the account page in ServiceNow and validating the log entries for the creds test.