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,239 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2019 07:00 AM
There are several ways to do this. I would look at creating a custom REST service were you pass the table and user then use a GlideRecord to check if the can read and write the table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 04:34 AM
Hi Drew.
Thank for your response.
My use case assumes that users works fully remotely with Servicenow.
And creating custom REST service requires some extra administrative work before via user interface. For now, I did not find any possibility of creating my custom REST service remotely (over existing REST?) even if my user has all required privileges.
Best Regards, Tomasz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 07:55 AM
You can create a Scripted REST API of you own in ServiceNow.
There are many examples there so you should have no issue creating what you want. You can then use the REST API Explorer to help generate the client code. If this will be for Service Portal then you should just use the server script to check things and skip the REST API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 02:42 AM
Hi Drew!
Thanks again for your help.
I created Scripted REST API endpoint and it works as expected.
It still not resolve my problem. I develop system that remotely manage resources on Service Now over REST API. Business requirement is to avoid any additional work made by Service Now admin. I can not force Service Now admin to create this endpoint.
My outer system in behalf of admin should on it's own install this scripted Rest API or find another way to check if another user has sufficient privileges to read/write in certain table.
BR, Tomasz Bar