Passing value in GetSecure String


I am trying to send my password as Securestring but when i am assigning the value i am receiving this error.
Any suggestions?


Hi @Zara,

Check your code, Are you sure the field called password_str should be an input argument? Why not a variable?


As you have declared passwords as secure strings you cannot give default value to them.
This is to prevent passwords to be visible as plain text in the code.

Use either Queue Assets or credential manager to store the actual passwords.

Hey Zara,

First, don’t pass the default value to the Secure string. It doesn’t accept the default value.
Second, As I saw snap you are passing wrong variable name pass Password_str(name of your secure string)


Thanks for the guidance everyone… But i am trying to pass password in TypeSecuretext od academy2 where I am facing this issue.

For that please store the password in excel and read from that and store in the secure string, do not pass password as the default value.

If you are not fetching password from orchestrator, for demo save the password in string don’t store in the secure string.

Hey @Zara

You have to use Get Orchestrator Credential that will fetch an asset of credential from orchestrator and will return password as a secure string output. or same Get secure credential which will return password as a secure string from windows valut manager,

For specific academy- 2 or we can say for best practice. but if you just wanna do normal type password then use normal type into instead of Type secure text :slight_smile:


Hi @Zara,

Check your code, if you want to use GetAppCredentials workflow, out_Pasword should be an output argument in GetAppCredentials workflow, so you have to use a variable to get its value and use it in type secure text password activity in System1_Login workflow.


Hi, if you check the instructions for Create Client Security hash it says:

“Unit test the created file using the default values of the arguments.” It does not say “Variables”, it says Arguments. So what you DO NOT want to do is: try and create a SecureString for the password variable by setting it to something like new System.Security.SecureString(Char(A),1) or doing Assign variable with .AddChar()

Instead: create a new asset in Orchestrator and call it “System1_Wrong_Credentials” and enter some credentials that will fail for logging into ACME, like “Pipo” for e-mail address and “TheClown” for password.

Now just like the instructions tell you, just change the “in_System1Credential” argument to point to “System1_Wrong_Credentials” and automatically your username, and more importantly your password will be set correctly (yes as a SecureString).

The result is you will get “E-mail/Password combo is not correct” pop up, which is what you need for the unit test. Good luck :slight_smile:

1 Like