Update a credential values per robot in credential asset

Does anyone know of a way to update multiple per robot credential values within a single credential?

Using the stock activities we can update the default/global value but not the per robot values inside as well. I looked into the uipath team’s orchestrator package, which allows you to Create Asset Per Robots but this only works for creation, and not the editing of an existing credential asset. As far as I can tell there’s no way to accomplish this without having a bot interact with the orchestrator UI itself, a scenario I’d like to avoid if possible.

Any Advice?

Hi @Scott_Fowler,
Welcome to the Community!
Could you expand it a little bit. I’m not sure if I got it right. There is a “Set Credential” activity which seems to have what you need but maybe I got it wrong.
image

As far as I understand Set Credential will only set either the main value or the per robot asset of the robot accessing the credential, so if you had 5 per robot values in there you wouldn’t be able to update them all.

Yes, this activity can update only one asset at a time. This basically mean that if your robot have proper rights for all of these assets you need to use this activity that many times how many assets do you have to update.

Say we have one Credential Asset called AppCredential
Say if the values are the default value, value for Robot 1, and value for Robot 2(all inside the AppCredential credential asset)

And the bot running the process is Robot 3, can Robot 3 update the Values of AppCredential belonging to Robot 1 and 2 and default? (Note that I’m not worried about doing it in one or many activities, but more so whether or not this is possible)

1 Like

Hi Scott . Was it resolved?

No, my team is leaving the updating of per robot credentials aside until a solution is identified. For now we’ll have to continue to do that part manually.

You can use Orchestrator HTTP Request. With one request you can update global as well as per user/robot values. However, problem is that API call is setting up (creating) exactly what you have there. So, if you have 5 values per user + global, and you want to update only 2 values per user and in this matter you construct API call, result is that only 2 values remain.

Entire API documentation is when you use your on-prem orchestrator link + /swagger (for example https://www.orchestrator.com//swagger). Next to Edit Value/Example value button there is also Model button to have more detailed information. Great documentation is also here:
Postman

Final solution for one asset should consists of:

  • 1st API - authentification (/api/Account/Authenticate)
  • 2nd API - to obtain folder ID (/odata/Folders)
  • 3rd API - to obtain asset info (/odata/Assets), use expand to obtain detailed information per robot/user, you need to use it in id key in JSON file, else previous record from database is deleted and new record in database is created (in swagger type UserValues in expand field)
  • 4th API - to update respective asset (/odata/Assets({key}) - do not use curly brackets in HTTP call)

I have identified minimum inputs needed, below you can find an example to update/set global value as well as to update/set (only) one value per user:
“{‘Name’:’_CredentialAsset_Test’,‘ValueScope’:‘PerRobot’,‘ValueType’:‘Credential’,‘CredentialUsername’:‘USER_2’,‘CredentialPassword’:‘456789’,‘CredentialStoreId’:9,‘Description’:‘Description’,‘UserValues’:[{‘UserId’:399,‘ValueType’:‘Credential’,‘CredentialUsername’:‘EFGHi’,‘CredentialPassword’:‘EFGH’,‘CredentialStoreId’:9,‘Id’:1017}],‘Id’:887}”

Hopefully that helps.

Ladislav