oauth 2 inbound REST is NOT working on the OOTB table API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 10:36 PM
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
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 01:07 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2022 03:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 01:11 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2022 01:32 AM
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?