Is there a way to install this global Script Include as global along with scoped application?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2022 05:11 AM
I have created a scoped application which uses one custom Global script include. I added Global script include to Application files to add it as part of installation package of scoped application. But it gets installed as scoped Script include. Is there a way to install this Script Include as global along with scoped application?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2022 05:16 AM
Hi
You'd be unable to capture that global record within your application update set as it resides outside that application scope. There's ways to set dependencies, but it wouldn't be in your literal app package.
Also, refer to this thread: https://community.servicenow.com/community?id=community_question&sys_id=f472ca99dbe26450fb4ae15b8a96...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2022 11:34 PM
Hi
Any update to this ?Any follow-up required? if not
Kindly mark the answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2024 01:14 AM
Cross-scope access restriction when using getDecryptedValue() method in a scoped app - How to resolve?
Hello Community,
I'm working with a scoped application in ServiceNow, and I need to retrieve a decrypted OAuth token for calling a REST message. The OAuth token is stored in the oauth_credential table, and I’m using the following script to retrieve it:
Security restricted: Access to api 'getDecryptedValue(token_received)' from scope 'x_my_custom_scope' has been refused due to the api's cross-scope access policy.
x_snc_salesforce_i: null
I understand that cross-scope access policies are in place to secure the environment, but I need to access the decrypted token within my scoped app. I’ve tried creating a Script Include in the Global scope to handle this, but the permissions don’t seem to be captured in my update set, and the script include doesn't resolve the issue.
My questions are:
How can I retrieve the decrypted token securely from a scoped app without encountering cross-scope access restrictions?
Is there a way to grant the necessary cross-scope access for a Script Include or another method to securely handle this situation?
Should I be using a different approach entirely to achieve this, and if so, what would you recommend?
Thanks in advance for any guidance!