- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2022 11:13 AM
I created a Script Include that uses sn_cc.StandardCredentialsProvider to retrieve a given credential I need to consume a REST operation. When this script include is called by my user (e.g. through a UI Action), which has the admin role, it runs as expected. However, when the script include is called by a non-admin user, the script fails because getCredentialByID returns null. Is there a way to make this script include work for non-user admins too?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2022 12:21 PM
I found a solution for this issue. Since I'm consuming the REST service using RESTMessageV2, creating a basic authentication profile and using it with the setAuthenticationProfile method enabled the script include to run when called by non-admin users.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2024 01:51 AM
With that being said: We may want to consider to not perform that rest request directly in a business rule but through an event - where the event script is then executed as a technical user/admin/system context.