Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

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.

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@dd31 

Is this for PDI or Customer instance?

if PDI then PDIs are highly unstable and we never know what it behaves.

if it's Customer instance then you need to debug further.

💡 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

Customer Instance.

Any suggestions to debug?

I have used Script tracer/BG script to create a record in data source table/Checked logs, but no luck

@dd31 

seems you are trying to create data source with Load by Script.

Did you try with simple data source?

💡 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

@Ankur Bawiskar 

I am creating simple data source only, but that field is getting populated with default value as:

 

(function loadData(import_set_table, data_source, import_log, last_success_import_time, partition_info) {

 

// Add your code here to insert data to import_set_table

 

})(import_set_table, data_source, import_log, last_success_import_time, partition_info);