change execution user for powershell action in flow designer

Yatharth Batra
Tera Expert

POWERSHELL ACTION IN FLOW DESIGNER EXECUTES AS SYSTEM USER BUT FAILES AS LOGGED-IN USER

 

I am trying to consume a powershell action in flow designer; the powershell is running on midserver as system user instead of user provided in connection details.

 

Snippet of result when I try to use command 'whoami'

find_real_file.png

 

This user is not having access to content which I am trying to read & edit - and the action fails with error as below:

find_real_file.png

and error code is having userid as passed in credential of this step.

 

Is there any way we can change the execution-user to be same as user passed in credentials instead of system account.

1 ACCEPTED SOLUTION

Yatharth Batra
Tera Expert

It is resolved, the service account which was running midserver as service on OS was culprit. Once changed it from system to user-account; the system was no longer reproducible.

View solution in original post

5 REPLIES 5

Marcin20
Mega Guru

Hi,

If this user is the same as the user who starts the flow, you can change the Flow properties:

Run As  - 'User who initiates session'

Note: that affects the executions of other actions within the flow.

 

Best Regards,

Marcin

 

If my answer helped you in any way, please mark this answer as helpful and correct.

The service account which was running midserver as service on OS was culprit. Once changed it from system to user-account; the system was no longer reproducible.

Malathi Vinoth
Tera Contributor

Hi Yathrath,

I am having same requirement and I am new to powershell.

 

Could you please guide me on the steps how to call powershell action in Flow designer.

You need to activate a plugin for enabling powershell action in flow designer and then consume the same.