Controlling Cross-Scope Table Access in ServiceNow

samarthcv37
Giga Contributor

I have a table named "Git_Hub" in the "CICD" application scope, and I have another application scope called "Student".

Now, I want to create a Client Script in the "Student" scope that should auto-populate a field from the "Git_Hub" table, which belongs to the "CICD" scope.

In the Application Access section of the table, I see only options like:

  • All application scopes

  • This application scope only

There is no option to allow access to a specific other scope.

How can I configure the Git_Hub table so that it allows access only to the "Student" scope (and not to all scopes), for security reasons?

Is there any way to restrict table access to a particular scope only instead of all?

2 REPLIES 2

Rushi Savarkar
Mega Sage

Hello @samarthcv37 

Please try the Restricted Caller Access privilege 

https://www.servicenow.com/docs/bundle/yokohama-application-development/page/build/applications/conc...

 

Please let me know if that works for you

Thank you!

Ankur Bawiskar
Tera Patron

@samarthcv37 

Things to do, please use GlideAjax script include from client script

1) ensure that table "Git_hub" is marked as Caller Access as "Caller Restriction"

AnkurBawiskar_0-1752214065585.png

 

2) then handle the restricted caller access record so that access is allowed from this script include to that "Git_hub" table from your scope. ensure it's marked with Status=Allowed. This record will be created in "Git_hub" scope. something like this

Instead of Document Templates scope, it will be your "Git_hub" scope. 

Select your target table on right side as "Git_hub", select your script include, status - Allowed

Restricted caller access privilege settings 

AnkurBawiskar_2-1752214274020.png

 

3) Create cross scope privilege records which allows access to this table from Your Student scope

AnkurBawiskar_1-1752214104125.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.