Flow works fine when run manually using the test button but giving error when it runs at schedule.

Chitra23
Tera Contributor

Hi,

 

I have a flow that has a action that uses powershell script step to get users from an OU in AD.  It is scheduled to run daily at a specific time. It was working fine earlier but now it is giving the below error

 

IPaaSActionProbe | PowerShell script execution failed. Script returned status 1 using account user #serviceaccount 

PowerShell script execution failed. Script returned status 1 using account user 

 

The same flow works  fine when i test it manually using the test button.

I have checked the service account being used and it has all the necessary permissions.

 

I have another flow that uses the same connection & credentials and it is working fine. I used  the  " Test cerdential" button in the action and it is working fine.

Any help in this regard woulbe very helpful.

1 REPLY 1

Nayan  Dhamane
Kilo Sage
Kilo Sage

Hello Chitra,

As I can check with the your mentioned question. The script is running successfully for most of the part. It might be an issue due to 'run as' for the flow. There might be some parameter in script from runned user or permission issue. Try adding 'run as' your profile and try.

Kindly mark helpful if it helped
Thanks,
Nayan Dhamane

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.