Dhanuka777
Dhanuka777

Reputation: 8616

ServiceNow - What are the security roles user needs to have to add/delete sys_users via the Rest api?

I am working with the ServiceNow Rest Api. When a user provides username and password to connect to the rest api I need to validate whether the user can add/remove (Manage users) users in sys_user table. How can I do that check?

I was referring to following Get table Rest api request, to check user whether he has nessasary roles,

https://.service-now.com/api/now/table/sys_user_has_role?sysparm_fields=role%2Crole.name%2Cuser%2Cuser.name%2Cuser.sys_id%2Cuser.department& sysparm_query=role%3D3d43716d0f6002003a2d47bce1050e0d%5EORrole%3Dac73b52d0f6002003a2d47bce1050eec&sysparm_display_value=true

What roles do I need to check? or is there an easier/better way to perform this (look for table permissions)?

Upvotes: 1

Views: 1824

Answers (1)

chasingtheflow
chasingtheflow

Reputation: 33

Assuming an OOB configuration, your API User would need the user_admin role in addition to any soap / web services roles.

See these OOB ACLs on sys_user:

Create: https://YOURINSTANCE.service-now.com/sys_security_acl.do?sys_id=f802c1d44f230200712553418110c752

Delete: https://YOURINSTANCE.service-now.com/sys_security_acl.do?sys_id=93c234f1072200000ca55720e1021e5f

Upvotes: 1

Related Questions