Knowledge Management REST API error

Daniel Arit
Tera Expert

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

2 ACCEPTED SOLUTIONS

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

SimonChristens_0-1732534570036.png

 

View solution in original post

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

 

https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/task/t...

 

DanielArit_0-1732560775070.png

DanielArit_1-1732560807802.png

I hope this will help!

Daniel

View solution in original post

6 REPLIES 6

Simon Christens
Kilo Sage

Hi,

As the error states:
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"

This means that user name and password is either not set up in the source to be used to authenticate or is maybe its wrong.

Hi Simon,

 

Thank you for your answer.

What do you mean that is not set up in the source to be used to authenticate?

The user is active and has the 'Web service access only' active (marked) with the following roles:

sn_km_reader

snc_platform_rest_api_access

knowledge

 

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

SimonChristens_0-1732534570036.png

 

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

 

https://www.servicenow.com/docs/bundle/washingtondc-api-reference/page/integrate/inbound-rest/task/t...

 

DanielArit_0-1732560775070.png

DanielArit_1-1732560807802.png

I hope this will help!

Daniel