Service Now API roles and permissions web_service_admin, rest_api_explorer insufficient

Martin Rampf
Kilo Explorer

We are curious around what Permissions and Roles apply in ServiceNow when using the public APIs. As per service now product and community documentation following roles should be sufficient: web_service_admin, rest_api_explorer to call the APIs, but we have been running into issues with this.

  • To get a list of metadata objects we query sys_db_object to fetch all the metadata objects in a service now account. This works successful with the roles defined (web_service_admin, rest_api_explorer
  • To get subfields on a particular metadata object, we query the sys_dictionary object with the name of the object and its parents (if any). This only works with Admin role assigned to the user calling the ÁPI.

Is there a workaround given that the suggested documented roles do not work as per documentation?

2 REPLIES 2

MrMuhammad
Giga Sage

Hi Martin,

web_service_admina and rest_api_explorer are least roles required for API calls. In addition you need to give roles required to interact with the target table. For example, if you are iteracting with import sets then Import admin etc.

Hope that helps!

Regards,

Muhammad

Regards,
Muhammad

Narsing1
Mega Sage

Hi,

The OOTB one is bit crazy that it won't support until you give all the permissions to reference fields as well.

Please use these Roles as well.  This will make sure that the Service Account that you are using have Read only access to all the table.  

  • admin
  • snc_read_only

Note:  Even though if you give admin role, that service account only gets the read only access.

Thanks,

Narsing