Postman Request returns 401 "Required to provide Auth information"

Christopher Doo
Kilo Expert

Hi im struggling to discover what is causing this error. 

In my instance via REST Api Explorer I can get a 200 OK response from this using the cn_cusomerservice_case table & the correct sysid of the Case I wish to retrieve.

GET https://xxxx.service-now.com/api/now/table/{tableName}/{sys_id}


In Postman however using the same User/password combination I get the 401.

i've checked the username/password is valid and & can login.
i've checked the user is active and the name/psw is correct (& can get the record via REST explorer)
I've check that the role snc_platform_rest_api_access has been added to that account.
i've checked the "Allow access to this table via web services" = true on that table.

I'm not really sure what other things I need to check add to allow this, any assistance would be appreciated.

1 ACCEPTED SOLUTION

Christopher Doo
Kilo Expert

Ok I tried everything and could not get my admin user working for REST API calls. However after much head-scratching I created a new integration user gave it the Admin role and marked as "web-service access only". Now everything works AOK from Postman.

I really cant understand why my own Admin user does not work but the new user does but at least the new one works. If you have issues with 401 you can start with that.

Thanks all.

View solution in original post

8 REPLIES 8

I am facing the same issue and trying to resolve it with some tips provided here. Can someone tell me, how or where do I mark the new user account as 'web-service access only'?

I am using Washington DC release.

I am facing the same issue and trying to resolve it with some tips provided here. Can someone tell me, how or where do I mark the new user account as 'web-service access only'?

I am using Washington DC release.

juliancoira
Tera Contributor

I'm having a similar issue with Postman using an API key.

 

  • The user account associated to the key has all the right roles to access tables/records queried (double checked from UI). Also the relevant roles for the APIs.
  • Configured all the API Access Policies for the APIs Case and Table. 

 

Still, every now and then I get an error 401:

{

    "error": {

        "message": "User Not Authenticated",

        "detail": "Required to provide Auth information"

    },

    "status": "failure"

}

 

If I executed the previous successful call from Postman right after this error, and then I switched back to the one that failed again... it works !

 

I'm starting to think this problem might be on Postman. 

Any updates?