Unable to generate OAuth token
search cancel

Unable to generate OAuth token

book

Article ID: 275511

calendar_today

Updated On:

Products

CA Service Desk Manager

Issue/Introduction

We are trying to add a new maileater using method described in - https://knowledge.broadcom.com/external/article/216187/oauth-setup-for-maileater.html

"Generate Access Token" button for OAuth is not working properly and takes to a blank webpage.

 

 

Environment

Release : 17.3

Cause

Excerpt from maileater_nxd.log:
=======================
2023-10-27 09:22:50:265 ERROR  [ForkJoinPool-1-worker-19] c.c.S.m.c.JavaMailIMAPClient - [ID:(m1120780@ad.<FQDN>),HN:(outlook.office365.com)] -> [IMAPS|993] Failed to connect to the Store.
javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:708)
2023-10-27 09:22:50:265 ERROR  [ForkJoinPool-1-worker-19] c.c.S.mail.OAuthProcessor - Refresh token is missing....can not get access token...
2023-10-27 09:22:50:265 ERROR  [ForkJoinPool-1-worker-19] c.c.S.m.ConnectSession - Failed to get a fresh access token...can not proceed further....
java.lang.Exception: Refresh token is null or empty

Resolution

Steps : 
# Edit NX.ENV 
# Update @NX_SERVLET_SERVER_URL

From: 
@NX_SERVLET_SERVER_URL=https://<FQDN>:443
 
To: 
@NX_SERVLET_SERVER_URL=https://<FQDN>

# Save the file, And recycle service desk services.

 

Additional Information

How to enable maileater additional logging: 
https://knowledge.broadcom.com/external/article/98428/debug-and-trace-logging-for-maileater-an.html