oauth 2 inbound REST is NOT working on the OOTB table API

Rahman3
Tera Expert

Hi All,

I am trying to access the Incident table data using the oauth 2.0 REST call. I do a get request via postman to: https://dev50458.service-now.com/api/now/table/incident?sysparm_limit=10 and providing the bearer token correctly. The request is authenticated (i.e. there is no authentication error) however the result is returned as an empty array []. If I use basic authentication and user and password with the same request it works. It is just the oauth 2.0 not returning data.

If I wrap the incident into a custom Scripted Rest API and run the request using the same token it works. So I am guessing there some ACL or something not allowing the oauth 2.0 to access the incident table? I have also checked that Application Access is correct. If its the ACL then what is the solution. Anyone had this experience before?

Any suggestions?

Thanks

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, I am unable to reproduce this in a PDI using Postman.
To clarify, you can use the same account credentials and it works if you update the same Postman message to basic auth ?

So it works for you? You can do a Get request via Postman to get a incident using an oauth token?

Yes, once authorized\you have a token methods should work
- this is dependent on your SNC instance configuration for webservices, or ACL's if not using a webservices specific user account.

EG GET https:<instanceName>.service-now.com/api/now/table/incident?

Authorization type is Bearer Token
and as I have never looked at setting up Postman variables I just paste the previously obtained token into the authorization token field

Yes, should work but it is not working! See the screenshot below. Status is 200 which is OK. Also the result is empty. This means there are some ACLs that are preventing it. This is OOTB I haven't added any ACLs. If change the incident to Problem or Chnage_Request all same blank result is returned but if I change the table the Task then I get the result. So how it works for you? So have you added any custom ACLS? 

 

find_real_file.png