Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Issue with Cross-Scope Error While Creating Data Source

dd31
Kilo Guru

dd31_0-1760522294661.png

Hello Team,

I am encountering the following error while creating a data source in the Global scope:

“Access to API 'setValue(sys_data_source.data_loader)' from scope 'sn_gcp_integ' has been refused due to the API's cross-scope access policy.”

However, the data source I am creating is unrelated to the application mentioned in the error.

To solve the issue I created 3 cross scope records (Create, Read, Write) with below info, but the error still persists:

  • Source Scope: SGC GCP

  • Target Scope: Global

  • Target Table: sys_data_source

Could someone please advise how to resolve this cross-scope access issue?

Thank you.

1 ACCEPTED SOLUTION

dd31
Kilo Guru

Response from HI

/*

Our development team has created Problem (PRB1619997) for this issue and they will continue work on providing a solution to this behavior in a future release. No additional changes will be necessary to uptake this fix.

Until then you can disable the Business Rule to prevent the error banner, or you can ignore the error banner as the Data Source is created even if it is displayed.

Next Steps:
Because the implementation of a PRB fix can take weeks or months, this case will be closed while work on the PRB continues.

 */

View solution in original post

9 REPLIES 9

@dd31 

I never encountered such error.

Try clearing instance cache or if the issue still exists then raise a case with ServiceNow.

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

Thanks, @Ankur Bawiskar , for pointing out the Data Loader. I noticed a Business Rule https://****.service-now.com/sys_script.do?sys_id=4729939f43ea51105dd500485bb8f234 that seems to be updating the default value I mentioned in my last message. If I disable this OOB Business Rule, everything works fine; otherwise, it causes issues. The Data Loader field should remain empty to avoid this error. I might need to reach out to HI since it’s an OOB Business Rule.

@dd31 

Glad to know.

💡 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Me Being Mustaq
Tera Guru

Hi @dd31 ,

 

The error occurs because ServiceNow is enforcing its cross-scope access controls, which restrict how applications (scopes) interact with resources defined outside their boundary.

That error means that an application (in this case, sn_gcp_integ or possibly SGC GCP if that's a custom scope) is trying to set a value on the Data Source (sys_data_source) table in the Global scope, but does not have the necessary permission.

Key Points About Cross-Scope Access

  • Cross-scope access must be explicitly granted using "Application Access" settings or cross-scope privileges.

  • The privilege you set should be for the scope named in the error (sn_gcp_integ), not just similar names.

  • Application Access on the target table (usually via the "Can read", "Can create", "Can update", "Can delete" checkboxes) must be configured as well.

If after these corrections the error persists, check for:

  • Any background scripts or business logic trying to access the Data Source from the wrong scope.

  • Whether you are invoking GlideRecord or similar APIs that are subject to cross-scope rules.

This approach should resolve your cross-scope issue as encountered during data source creation in ServiceNow.

If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.

 

Thanks & Regards,

Mohammed Mustaq Shaik

dd31
Kilo Guru

Response from HI

/*

Our development team has created Problem (PRB1619997) for this issue and they will continue work on providing a solution to this behavior in a future release. No additional changes will be necessary to uptake this fix.

Until then you can disable the Business Rule to prevent the error banner, or you can ignore the error banner as the Data Source is created even if it is displayed.

Next Steps:
Because the implementation of a PRB fix can take weeks or months, this case will be closed while work on the PRB continues.

 */