Retrieving secure string from datatable

I have a secure string type in my datatable but when I try to extract it or even use a Type SecureString I’m not able to do anything because I can’t convert an object to a secure string. Any advice?

@Will_Tyler

secureString = new system.Net.NetworkCredential(string.Empty, your_object.ToString).SecurePassword

Try the above expression in assign activity

Hi @Will_Tyler

Check the below thread which I posted some time back on Secure string. It has a working sample workflow as well. it helps you to convert string to secure string and secure string back to string…

I guess this is what you are looking for…

1 Like

You can try using CType - to convert type…
CType(row("col"), System.Security.SecureString)

EDIT: Also, reason I am suggesting this is because you say your value is already a secure string type but is just inside an object type, which means you need to convert the object to the secure string. If it was a string type, then this will be different, and would need to use NetworkCredential() suggestions to take a string and convert to a secure string.

3 Likes

That worked. Thank you!

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.