How do I use secret variables in my scripts/apps

Hello,

I am running version 5.0.15.
I installed PowerShell Universal using the instructions from this guide Installation | PowerShell Universal via msi and it runs as a service account set up according to these instructions Running as a Service Account | PowerShell Universal.

I would like to use secret variables in my apps and scripts. Creating the secret variables via the Platform > Variables tab works, but I cannot retrieve them using

$Secret:MySecret

This always comes up empty. It doesn’t matter if I call the secret in a script or an app. My secret variables look like this:

secretVariable

Am I doing something wrong? Did I miss a setting?

1 Like

try to edit the Value over the edit button. If i do it so its write the data to the SQL DB.
If i only create a new Variable the DB remains empty.

1 Like

Thank you, entering the value again using the edit button worked.

This is a bug that will be fixed in an upcoming version. I had a support ticket in about it as well.