How to fetch the value in Studio from asset of type Secret

I am seeing a new option as secret as asset type. I believe it is used for storing API keys, how can i fetch the valye into Studio workflow?

I have tried using get credential and fetch value from password field bit its throwing error when i am using the activity : get Credential. Please suggest ??

Hi @Raj_Kumar7

You should be able to fetch the same using get credential activity.

Can you share what errro you are getting?

Have you verified if you are using the correct asset name?

Let’s assume in a modern folder named Shared we have a Credential Asset named Credentials_values. This credential asset holds credentials for different robots.


In the Studio sequence in the Get Credential activity provide the Asset Name and the OrchestratorFoldePath values from Orchestrator, and in the output, create two new variables that will hold the Password and Username values.

In order to transform the SecuredString value to a String you can use an Assign activity that will create a new String value.

new System.Net.NetworkCredential("",CredentialPassword).Password

Results from the Output panel for the Log Message activity:

Log Message activity Message value:

"Username: " + CredentialsUsername + "\nCredential Password: " + CredentialPasswordToText

image

1 Like

Hi @sonaliaggarwal47

I was receieving the below error, Please advise

Get Credential: Error converting value “Secret” to type ‘UiPath.Core.Activities.AssetValueType’. Path ‘ValueType’, line 1, position 188.