Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Help with System properties.

Abhijit Das7
Tera Expert

Hi Team, 

 

I have a system properties in Custom scope A. And there is scripted rest API in Custom scope B. I am trying to update the system property but, unable to update it. 

Error 
1. 

Message
Access to api 'put(sys_properties.value)' from scope 'custom_scope_name' has been refused due to the api's cross-scope access policy.
2. Write operation against 'sys_properties' from scope 'custom_scope_name' has been refused due to the table's cross-scope access policy
Any idea, how can I solve this issue.

Thanks in advance
5 REPLIES 5

Nilesh Pol
Kilo Sage

@Abhijit Das7 please create/update/verify the entry in "sys_scope_privilege" table as follow:

  • Click New to create a new cross-scope access rule.
  • Fill in the following details:
    • Calling Application: Select the application for Custom Scope B.
    • Target Table: sys_properties.
    • Operation: update (or write if you want to allow all write operations).
    • Active: Check this box to activate the rule.

Thanks

Ankur Bawiskar
Tera Patron

@Abhijit Das7 

that's blocked due to cross scope.

Why not create that property in same scope as that of Scripted REST API?

what's the purpose behind creating that property in other scope?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

yashkamde
Mega Sage

Hello @Abhijit Das7 ,

 

You can’t directly update sys_properties across scopes. The cleanest solution is to wrap the update logic in a Script Include in the property’s scope, mark it accessible, and call it from your REST API. That keeps you compliant with ServiceNow’s cross-scope security model.

 

Script Include :

Screenshot 2026-03-23 141751.png

 

Script :

updateProperty: function(name, value) {
        var prop = new GlideRecord('sys_properties');
        if (prop.get('name', name)) {
            prop.value = value;
            prop.update();
        }
    }

 

Then call this SC from another scope :

var propertyName = <Name>;
var newValue = <value>;
new PropertyUtil().updateProperty(propertyName, newValue);
gs.info(gs.getProperty(propertyName));

 

If my response helped mark as helpful and accept the solution.

 

Hi @yashkamde,

As per ServiceNow we shifted our Scripted REST API code to Script Include. And we call script include inside the Scripted REST API. 

So, now you want me to create a new script include in same scope in which system property is present. And call this script include inside the main script include of Scripted REST API which is present in another scope.

Can you please elighten me on this?