- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 04:41 AM
As part of the implementation of the new feature with XAnadu, which enables sending an OAuth token request via a MID Server, we followed the steps outlined in this KB article https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1645211.
The steps are as follows:
1. Creation of an application registry that correctly contains the client ID, client secret, token URL, and grant type as configured in the application.
2. Creation of OAuth 2.0 credentials.
3. Selection of the dev MID server and activation of the “Connect to Auth Server via MID Server” checkbox.
During testing, we receive the error: ‘OAuth flow failed. Verify the configurations and try again. Error detail: failed to request a token.’
We also have both input and output records in the ECC queue; for the output, the source correctly points to the token URL but contains an encrypted body, while the input record receives an empty payload.
The OOB script used to generate the token is OAuthConsumerSupport. During testing via a background script, the following error appears:
REST Msg Outbound - ECCRESTResponse: Error while evaluating the XPATH Expression against response: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]: org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:297)
... OAuth authentication failed for client_credentials grant type flow.
Has anyone encountered this error before or have any suggestions on how to resolve this issue?
Thank you for your feedback!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 12:06 AM - edited 03-31-2025 12:33 AM
Hello,
I had the exactly same problem, Check if your mid server has unresolved issues and resolve them. If that can help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 12:06 AM - edited 03-31-2025 12:33 AM
Hello,
I had the exactly same problem, Check if your mid server has unresolved issues and resolve them. If that can help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2025 12:33 PM
Thank you, That was the issue.