The SecureString type is unavailable

Hello everyone,
If you know how to address the following issue, I’d appreciate your advice.

(What I want to do)
Treat the password used to log in to a website as confidential information.

・Retrieve the information from Windows Credentials (Get Secure Credential) => Done
・Store the retrieved information as ID: String type and Password: SecureString type => Done
・Run a test in Debug mode => Error occurs (something like “SecureString is not recommended”)

I’m currently working through the following solutions with GPT:
・Convert the SecureString value to a String using something like plainPassword = New System.Net.NetworkCredential("", securePassword).Password => Not possible, since I haven’t even reached that step
・I’m using System Activities 22.4 ⇒ Downgrading to version 21.x has also been recommended => Haven’t tried this yet
・Use the Orchestrator CredentialAsset activity => Error occurs (error code: ST-SEC-007 “You do not have permission to use the specified credential asset.”) => I assume this is also related to Orchestrator permissions, but since the SecureString type itself isn’t working properly, I expect changing this won’t resolve the issue

@111161,

Check if the Credential asset is Robot specific asset. In case it’s configured as robot specific in the orchestrator, make sure you are adding your robot account specific value there.

You can also try creating a separate credential asset to test.

Thank you.

Would retrieving an Orchestrator Asset resolve the following issue?

  • Currently, we use “Windows Credential (Get Secure Credential)” to retrieve the password as a SecureString
  • An error occurs at the time of retrieval (before conversion, such as with Assign)
  • The error message contains wording such as “SecureString is not recommended”

@111161,

I’m not quite getting the query correctly may be due to translation. @Yoichi could you please look into this.

Hello,
Could you please share some details, such as the version, as soon as possible?
(Studio, project type, etc.)
Alternatively, if you can share a dummy project that reproduces the issue, could you please send it over?

It worked without any particular issues in my environment (Studio 24.10.12).

Thank you!
I don’t have the tool on hand right now, so I’ll share it with you later.

@Yoichi
Thank you for your hard work.

Earlier, I tried a simplified version to provide sample source code. I used Get Secure Credentials, followed by an Assign to convert it to a String.
Both worked as expected.

Until yesterday, after I clicked the Debug button, I got an error saying that SecureString was deprecated, but it didn’t appear today.

This is only a guess, but it may be because until yesterday I was using a method that returned the SecureString variable to Main via Arguments rather than Variables. To be honest, though, I don’t know what changed from yesterday.

In any case, everything is working fine now, so I would like to close this issue.

Please let me know if you have any concerns.
※This is a separate matter, but I plan to post one more question on the forum later.

Could the above have violated the following Workflow Analyzer rule?

@Yoichi
Thanks for your hard work.
The setting in Workflow Analyzer was set to Error.
I found the cause.
Thank you.