- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2024 02:00 AM
Hi all,
Please offer support on the following situation:
I have set up the Knowledge Management REST API (I say I have done all the steps). When I try to 'POST' using a testing API tool to identify the Access Token for connection with a third-party application, I receive this error:
{
"error": {
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"
},
"status": "failure"
}
The Service Account User is created, and has the necessary roles (I have created the sn_km_reader role and allocated it to the user), the snc_platform_rest_api_access role is assigned, and the knowledge role.
Note: The connection is set up to GET the knowledge management articles using the external application.
Please let me know if you have any suggestions for fixing this!
Thank you,
Daniel
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2024 03:37 AM
As I dont know what API testing tool you use its hard for me to tell how its set up.
Postman for ex - then you set the auth method and enter the credentials - service account user name and password to be used when you integrate to ServiceNow - no matter the method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2024 10:55 AM
Hi Simon,
Yes, I'm using Postman too however I need to create a Service to Service connection.
Please see an article related to the steps that I've followed:
https://www.servicenow.com/community/developer-blog/oauth-2-0-with-inbound-rest/ba-p/2278926
I hope this will help!
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2024 09:43 PM - edited ‎11-25-2024 09:53 PM
Hi again,
Have you set up an Oauth Client in the environment?
After that as well as the user account in SN
- In this sample i just created some variables in Postman and put in the information
There shouldnt be done anything else to be able to generate an access_token that can then be used as a Baerer token
In addition - ServiceNow have provided some information about Oauth testing in Postman
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0822262
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2024 02:57 AM
Hi Simon,
Thank you very much for your help!
Those steps were done; however, today, I decided to delete the initial config and create a new one from scratch, and now the result is okay. I have retrieved the access token, and the knowledge articles can be accessed!
I appreciate your help!