Check if user has access to certain resources using ServiceNow REST API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2019 03:21 AM
I have credentials of service now user.
Is there any way to check over REST API if this user has access to read/write operations on certain table?
For read operation I can just request for resource and in case of insufficient privileges I have appropriate HTTP status code, but I still don't know if user can write.
Best regards, Tomasz Bar
- Labels:
-
Service Portal Development
- 3,244 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 08:01 AM
What do you mean manage resources?
Also your SNC admin is going to have to do some work on his end to allow an account to make a REST call to the instance. The best you will be able to do is create everything in a Dev instance and then export the update set and have them import it and commit it. But there are going to have to be some changes made to allow management of resources, even if its just apply roles to an account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 02:33 AM
I create fully independent system that only communicates over REST API with Service Now. My system receives data from some resources and process it. I just want to save this data as records in ServiceNow in tables (eg. incident) using REST API.
Service Now admin role in this use case is to create "technical user" in Service Now and give this credentials to our system, but I don't want to force him to do any additional work. Credentials of this "technical user" are used to authenticate during process of modifying and creating records.
I just want to be sure that privileges of this "technical user" are sufficient to do this. So, my system need check somehow (assumes that I have technical user login and password, and table name) is "technical user" allowed to read/write on this table.
Solution with scripted Rest service is would be sufficient if there is some way to register this endpoint over REST.
Best regards, Tomasz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 03:29 AM
You can check it using Table API, but you might have to repeat couple of steps like
Run GET method to verify read capability
Run POST to insert a record, capture the sys_id.
Run PUT by passing the sys_id and update the specific field
Run GET and verify if the field is updated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 07:06 AM
You can do what dvp is suggesting or you can build the REST service that will do the checking, put it in an update set then just ask them to install it. That is a very simple task and will not require them to do much work and will prevent you from having to run a bunch of tests to see what permissions the user has each time.
You can build and test the whole thing with a developer instance if you wanted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 07:13 AM
Thank you for your reply.
This is solution I implemented right now, but I do only first GET for record from table.
I also thought about modifying records, but in case when user has no rights to delete (but can write) then I leave this dummy data in table and this is not good.
Best regards, Tomasz