Impersonation in scoped app - Run as admin

Ankita Bisht
Tera Contributor

How to do run as admin activity in Flow Designer.

I have a requirement to convert the run as admin script activity of workflow editor to flow designer.

 

5 REPLIES 5

OlaN
Giga Sage
Giga Sage

Hi,

A Flow can be run either as the user that invoked it, or as system. There are no other options.

If you're running a Xanadu instance, these options are hidden under "Additional properties" when creating a new Flow.

To answer your specific question, I would suggest you create a Subflow that runs as system and performs those specific steps needed to run with admin access.

Animesh Das2
Mega Sage

Hi @Ankita Bisht ,

 

As @OlaN mentioned a flow can be triggered and executed either with the privilege of the user who invoked it, or as system with admin privilege.

However, if you want your flow to run with user's privilege who invoked it but there is one 'script' action that needs to be run with admin privilege particularly, then I think of one solution that you could try to solve your purpose.

 

You can write a custom script action inside the flow where you call an event using gs.eventQueue() and that event registered should have the script logic/code that you want to run with admin privilege in it's script action.

 

If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

You can Accept as Solution for multiple responses as well.

Thanks, 

Animesh Das

You can write a custom script action inside the flow where you call an event using gs.eventQueue() and that event registered should have the script logic/code that you want to run with admin privilege in it's script action.

 

Are you suggesting to call a scheduled job using gs.eventQueue()  or a Business Rule?