How to pass a SecureString argument?


#1

Hello,

New to .Net/UiPath…how do I pass a password argument through the SecureString argument type?

Thanks!


#2

hi @nsl1006

To pass a password in a secure way you can use this .net class and function.

Password= new System.Net.NetworkCredential(string.Empty, SECURE_STRING_PASSWORD).Password

*Here SECURE_STRING_PASSWORD should be replace by your password string.

Best way to use windows credential manger password string to make it most secure.

For a better approach i would advice you to use password and other sensitive informations by using following ways:

  1. You should use windows credential manager to use such sensitive information. it is good way to keep things secure and manageable.

  2. Use Orchestrator Asset option also to use such information,.

Let me know if anything else you know or issues,

Thanks& Regards…!!


#3

Thanks for your reply. So how is UiPath grabbing the password from WIndows? I am using the Type Secure Text activity and have a SecureString argument.


#4

hi @nsl1006

Uipath have activities like Get Credential and AddCredentials and many more similar activites to deal with credentials on windows.

Go through with these. just enter in search activity bar credential, you will get these.

and if you are using Assets in orchestrator then use “Get credential” activity in Orchestrator cateogry.

Regards…!!


#5

Hi,

I’m having my credentials in Windows credential manager, and using Get Secure Credential I tried to get the username and password. But the password is always returned as blank. How to get the password correctly. Attaching my workflow.Test.xaml (6.0 KB)


#6

Hey @PD2

Use Credential Type as Generic.
and wanna know any specific need to Use Domain Password?

Regards…!!
Aksh


#7

Thank you @aksh1yadav… It was my bad, I was adding the credentials as Windows credential and not a generic credential.