# The SecureString type is unavailable

**URL:** <https://forum.uipath.com/t/securestring/2833477>\
**Category:** フォーラム\
**Tags:** question, studio, activities\
**Created:** [May 28, 2025, 12:25am UTC](https://forum.uipath.com/t/securestring/2833477 "2025-05-28T00:25:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![111161](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/111161/32/97716_2.png) [@111161](https://forum.uipath.com/u/111161)\
**Post date:** [May 28, 2025, 12:25am UTC](https://forum.uipath.com/t/securestring/2833477/1 "2025-05-28T00:25:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashokkarale](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashokkarale/32/474400_2.png) [@ashokkarale](https://forum.uipath.com/u/ashokkarale)\
**Post date:** [May 28, 2025, 12:38am UTC](https://forum.uipath.com/t/securestring/2833477/2 "2025-05-28T00:38:17Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![111161](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/111161/32/97716_2.png) [@111161](https://forum.uipath.com/u/111161)\
**Post date:** [May 28, 2025, 1:13am UTC](https://forum.uipath.com/t/securestring/2833477/3 "2025-05-28T01:13:19Z")

</div>

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`”

---

<div class="post-metadata">

**Author:** ![ashokkarale](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashokkarale/32/474400_2.png) [@ashokkarale](https://forum.uipath.com/u/ashokkarale)\
**Post date:** [May 28, 2025, 1:49am UTC](https://forum.uipath.com/t/securestring/2833477/4 "2025-05-28T01:49:24Z")

</div>

@111161,

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

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [May 28, 2025, 1:57am UTC](https://forum.uipath.com/t/securestring/2833477/5 "2025-05-28T01:57:31Z")

</div>

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).

 ![image](https://global.discourse-cdn.com/uipath/original/4X/6/c/c/6cca1f4b1f8ce4e1d67260a8f6aae4b84bf566cd.png)

---

<div class="post-metadata">

**Author:** ![111161](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/111161/32/97716_2.png) [@111161](https://forum.uipath.com/u/111161)\
**Post date:** [May 28, 2025, 2:05am UTC](https://forum.uipath.com/t/securestring/2833477/6 "2025-05-28T02:05:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![111161](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/111161/32/97716_2.png) [@111161](https://forum.uipath.com/u/111161)\
**Post date:** [May 28, 2025, 4:46am UTC](https://forum.uipath.com/t/securestring/2833477/7 "2025-05-28T04:46:30Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [May 28, 2025, 4:54am UTC](https://forum.uipath.com/t/securestring/2833477/8 "2025-05-28T04:54:01Z")

</div>

> [@111161](#):
>
> 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. Honestly, I don’t understand what changed since yesterday.

Could the above have violated the following Workflow Analyzer rule?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/e/f/5/ef54db9bc4d07f6bd77663ed8754d0b4b9575429.png)

---

<div class="post-metadata">

**Author:** ![111161](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/111161/32/97716_2.png) [@111161](https://forum.uipath.com/u/111161)\
**Post date:** [May 28, 2025, 6:37am UTC](https://forum.uipath.com/t/securestring/2833477/9 "2025-05-28T06:37:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [May 31, 2025, 6:37am UTC](https://forum.uipath.com/t/securestring/2833477/10 "2025-05-31T06:37:51Z")

</div>

Closed on May 31, 2025, 6:37am UTC

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