- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 08:14 PM
Hi folks,
I'm calling a flow action via a run script as:
var result = sn_fd.FlowAPI.executeAction(actionName, inputs);
This works fine if the logged in user is admin. But when a non-admin executes the workflow, the action errors out saying that it is prohibited by security rule.
Now I'm aware that in flow designer there is a "Run as" option to make it run as system user. But when calling the flow action directly, is there a way to specify this as well?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 08:28 PM
As per my understanding while calling in script you cannot set the Run as unless you have specified in the flow properties itself.
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
12-07-2023 08:28 PM
As per my understanding while calling in script you cannot set the Run as unless you have specified in the flow properties itself.
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
12-07-2023 08:40 PM
As per my understanding while calling in script you cannot set the Run as unless you have specified in the flow properties itself.
Its not the flow that I'm calling, rather a flow action. Thus the query to know if Flow Action has a way to set a Run as property.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 03:26 AM
So it's no possible to do it in a standalone action. Workaround would be to include the action in a flow designer and use the flow properties to define the "Run as"