Passing value in GetSecure String


#1

Hi,

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

Thanks


#2

Hi @Zara,

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

Regards,
Susana


#3

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.


#4

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,
Pravin
Innowise


#5

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


#6

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.


#7

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:

Regards…!!
AKsh


#8

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.

Regards,
Susana


#9

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: