- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 10:50 PM
I have used the below URL to fetch the incidents from an incident table using basic authentication (used ServiceNow username and password), when hit the send from postman, unfortunately getting 401 unauthorized response
GET URL: https://devxxxxxx.service-now.com/api/now/table/incident?sysparm_limit=1
can you please guide me to resolve this authentication issue, I tried but could not exact information for the same.
Solved! Go to Solution.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 03:47 AM
Hi,
Did you check username and password combination is correct?
Also OOB there is query business rule on incident table so did you check the user is satisfying any records?
Please check with admin user once
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 06:00 AM
Hi,
Did you check your email is populated in user_name field? please use that during basic auth
Also please check the query business rule on incident table
Please check whether the user you are using for authentication
1) Is caller
OR
2) Is opened by
OR
3) Is present in watch list
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 06:16 AM
but one thing I observed here, I have manually created only two incidents in my dev instance but when I fetch the incidents using API, it getting a lot of incidents that I did not create,
why it is so, is that created by some other users and shared over the same dev instance?
API GET details
My dev instance incidents (only 2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 06:23 AM
Hi,
if you are admin then query BR won't run for you.
So it is returning all records
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader