Enter User Role in script Include when its client callable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2023 09:05 AM
Hi All,
Please help me with this issue,
Whenever I am trying to save my script include which is client callable, it is asking for user access role to give. I am not aware of this thing. What role I should give, how I can decide.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2023 09:30 AM
Hello @pandeyved,
Client callable script includes are a special type of script includes that can be called from client-side scripts, such as UI scripts or client scripts. They can be used to communicate with the server and exchange data without reloading the page. They usually work with GlideAjax, a ServiceNow API that handles the AJAX requests and responses.
However, client callable script includes some security implications, as they can expose sensitive data or functionality to unauthorized users. Therefore, ServiceNow requires you to specify a user access role for each client callable script include. This role determines which users can access and execute the script include from the client side.
The user access role for a client callable script include can be any existing role in ServiceNow, such as admin, itil, or sn_custom_role. You can also create your own custom role for this purpose. The role should be relevant and appropriate for the functionality and data that the script include provides. For example, if the script include performs some administrative tasks, you may want to use the admin role. If the script include accesses some confidential information, you may want to use a custom role that only grants access to specific users or groups.
To specify the user access role for a client callable script include, you need to do the following steps:
- Open the script include record that you want to make client callable.
- Check the Client callable checkbox.
- A popup window will appear asking you to select a user role for access control.
- Choose the desired role from the drop-down list and click OK.
- Save the script include record.
You can also change the user access role later by clicking on the lock icon next to the Client callable checkbox and selecting a different role.
You will find more details here - Privacy on client-callable script includes (instan... - ServiceNow Community
Hope this helps.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2023 10:43 AM
@pandeyved: If you find my answer helped your solution, please mark it as correct so that it can help other community users as well.
Kind Regards,
Swarnadeep Nandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2024 09:59 AM
If you do have the script include on the custom table and a catalog client script. Will you get the pop up to choose the user role ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2024 10:27 AM
Hi @pandeyved,
if you want this script to be accessible for everyone you can give role like 'snc_internal' so that it will be public
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang