I have created a Pwd and select credentials but what is meaning of username to give here, what username I have to enter here is the same for which I am using this password again when I use get credentials in the workflow it asks me password & username. I don’t even understand why I need to give again If I defined in the orchestrator.
You dont have to give username and password exactly in the workflow. you have to pass the variables which will be storing your value of username and password whatever you have entered in the orchestrator .
Use get credential activity.
Main purpose is - Password will be encrypted ,and you dont need to update the code for password change ,just you have to update password in orchestrator and it will automatically take the same password.
But what username I have to give in the above pic.
your username …for example to login UIPath Academy your Username is “abcde”. Than you have to provide “abcde” here in orchestrator as username and password in “password” option.
Than you have to use "get credential " activity in your code.

Have set username and password in the orchestrator with the name is Pwd & and my username and used activity get credentials in the studio. Given name in the asset field is same as Pwd set in Orchestrator in double quotes. And in the Output crated new variable to store the username and password value. But in Password it’s given the error. Snapshot in the post. Kindly let me know where is the exact error is?
variable type for password should be securestring
It’s a secure string type only. But showing an error it unable to convert secure string into string.
use this
string password = new System.Net.NetworkCredential(string.Empty, securePassword).Password
Bro,
See this, since I am using password into type into activity it’s consider as a string.But it’s not convert into string. Where I have use this given command.
Variable type of “Pass” should be string only
Instead of using Type Into, you can try for Type Secure Text activity. And Pass Pwd secureString to it.
When I change the type of Pass It’s showing the error snapshot.
When using secure typing. The problem is not with type use activity. The problem with password defined it’s showing the error. Snapshot is attached.
I will tell you step by step -
- variable type of “pass” should be secure string.
- create new string variable , suppose “strPassword”.
- Assign – strPassword=new System.Net.NetworkCredential(string.Empty, pass).Password
- in type into activity , give the variable “strPassword”
Hope it will help u
Hi,
Is the variable type of your variable “pass” is “SecureString”, if not change the variable type to “System.Security.SecureString”
As I mentioned add your “Pwd” variable instead of “Pass” variable in Type Secure Text as it require secureString type variable input.
@syedabidraza Thanks It’s worked bro
Subham, I am confusing in using secure type activity. How to give variable it has not output field in the properties only input field showing. when I give strPassword variable it’s taking in double quotes, since we’re not using a variable in double quotes.
I have explained you one method , how to convert secure string to string .Using secure text is alternative for this .
I will explain you this activity in your scenario only !!
- you store your password in “pass” variable with datatype “secure string”.
- take “type secure text” activity .
- in “secure text” in properties, you can give your variable “pass” which is having “secure string” datatype.
- rest it is similar with “type into” activity, for more details you can refer this link Type Secure Text
It will help you in learning different ways of doing one thing.
One more thing , output field is not require for this activity , as it is use for just writing the store variable.
Great Bro, Understand and it’s worked