Dashboard app using run as

Product: PowerShell Universal
Version: 4.2.21
I have a setup powershell universal to run as a service with a service account. Made the service account local admin for troubleshooting purposes just rule out permissions.  I have windows authentication setup and so far can log in with no issues with our AD accounts.  The problem is there is an app I created that requires being run with an elevated account, so Isetup a secret variable with an account that has the rights to run the app.  But when going to the app and running it I get access denied when it performs the submit that action that requires elevation. When looking at the log it shows that it is running as the currently logged in user and not the account credentials I put in the run as in the settings of the app.

Is your app running in the integrated environment?

Per the docs on Environments (linked below), “The integrated environment does not support running as alternate credentials.” - You’ll need to create an additional environment and configure this app to use it.

Environments | PowerShell Universal

Ah, that was it. The app was set to default in environment. I switched it to agent and it worked with the run as credentials. Thank you.

1 Like