Hi,
I’ve a scenario in which I retrieve a password from an asset. Now I want first four characters of it how to achieve this?
Hi,
I’ve a scenario in which I retrieve a password from an asset. Now I want first four characters of it how to achieve this?
Hi @lrtetala ,
My password is a secure string not a normal string. Will the substring work the same way on password?
Then try this
str_Password = New System.Net.NetworkCredential(String.Empty,Password).Password
FinalPassword = str_Password.Substring(0, 4)
Regards,
(New System.Net.NetworkCredential(String.Empty,Password).Password).Substring(0, 4)
Follow these steps.
Get Credential activity. This will return you output String User Id and SecureString passwordAssign activity to convert SecureString to String like thisstringPasswordVariable== new System.Net.NetworkCredential(string.Empty, secureStringVariable).PasswordAssign Activity like thisstringFirstFourChar = stringPasswordVariable.Substring(0, 4)Thanks,
Ashok ![]()