How to cross scope "Scripted REST Service"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 08:35 PM
Hi All,
I request you please help me on below concern
We have Scripted REST Service(GET)- sending Incident data when request comes, Some times Successfully Data passing , some times going to else part & sending error "No data found" to other party.
When I checked Transaction logs, "Origin Application" showing different scopes for same 'Scripted REST Service",
some times "Customer Service",
Some times "Global,",
Some times "Human Resource",
some time "Guided Tour"
is this Problem ? why for same Scripted REST Service" different scopes showing in "Origin Application" columns. ? sometimes successful, some times Error Message ?
If this is because of lacking of crossscoping ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2025 07:13 AM
So scripted REST API is in Global scope.
Next question
-> how is this getting called?
-> is it called from within the instance but from different scope such as HR, GRC etc?
-> if yes then definitely cross scope might come into picture as you are calling it may be from BR which is in HR or GRC scope but scripted REST API is in Global scope
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2025 08:00 AM - edited 08-21-2025 08:09 AM
We shared
scripted REST API Resource Path ( Application : Global)
Service Account ( API User) details to other tool peoples , they utilized ServiceNow details thier side.
No Flow, No BR, No Script Include. we scripted in Scripted REST Resource(sys_ws_operation)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 09:15 PM
Can you share the Scripted REST API and which scope it is created under ?
Are you sure someone not just testing it manually from REST API explorer and their scope is different to Scripted REST API definition without cross scope privileges that is causing the issue ?
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 10:21 PM - edited 08-20-2025 10:27 PM
Scripted REST API in Global Scope.
Yes, we are sure no one testing manually , they are requesting INC data from different tool.
we don't have any script include and flows, it's simple GlideRecord record in Scripted REST API.
they will search with User ID, user related incidents details scripted rest api will returns that it.
but not understanidg why different scopes showing under "Origin Application" column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 10:05 PM
Hi @chanikya ,
The Scripted REST service persists in its original scope (e.g., Global or a custom scoped app). However, the calling context, for instance, a REST Test, Script Include, or Flow can originate from different scopes. This does not mean the service itself is moving across scopes; rather, it's being invoked from clients in various application contexts.
Note: Check that the Scripted REST API is consistently defined in the correct and intended application scope......
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/