"Secure string length is only taking 3 characters"

Hi All, I read a string for a password an changed it to secure String
as new System.Net.NetworkCredential(“”,“mystringpwd_Variable”)).securepassword.

But my question is its only taking 3 characters. But i want all the characters from my password.

Can anyone help me please.

Thanks in advance

Don’t put mystringpwd_Variable inside quotes. It’s a variable, not a literal.

1 Like

hi @saritha

Just a suggestion

Can you try to save the credentials in Windows credential manager or asset so that you can able to get the password as secure string

If you chose windows credential manager you need to download the credentials package

OR
Use the Get Password activity (You need to provide the password in password field and if you type there it will be hidden characters with dot and save them and it will be string)

Hope this helps
Regards
Sudharsan

1 Like

thanks all for all ur replies.

Finally I tried like new System.net.networkcredentials(String.empty,mystringvariable)).SecurePassword.

I hope it will be helpful for others who need it

Have a great day everyone.

1 Like