New issue setting the password of a Credential Asset?

UiPath Orchestrator Experts,

We have a custom application that keeps passwords synced between CyberArk Password Vault and UiPath Orchestrator. Our orchestrator is deployed to Azure (Paas) so we can’t use the native CyberArk integration.

Basically, we fetch passwords from PWV (CyberArk) and make API calls to the Orchestrator to update the password of credential assets.

This system was up and running fine with UiPath Orchestrator version 2018.4.3. However, after updating to 2019.10.16 the PUT to the Assets API returns an error; “{“message”:“The user name or external name cannot be null or empty.”,“errorCode”:1500,“resourceIds”:null}”.

We’ve determined that the call works if we provide the “CredentialUsername” in the body of the PUT. However, he GET Asset API doesn’t return the “CredentialUsername” or user name in the “Value” field, despite what the documentation on Swagger say, so we may not necessarily know which username to send back with the PUT. Like I mentioned, this was working. Is the requirement of the username something new?

TLDR:

A PUT to the asset API no longer updates the password of a credential asset unless you provide the CredentialUsername in the request body. This wasn’t an issue in 18.4.3.
A GET to the asset API doesn’t return the CredentialUsername.

It turns our there was an update to the API:

Please see more details in the release notes here:

https://docs.uipath.com/releasenotes/docs/2019-10-1

The solution to retrieve the username was to use $expand RobotValues parameter of the GET. The credential username will then be returned in the “Value” field. We can then post that username back with the PUT to update the password.

When not using $expand RobotValues:

"value": [
    {
      "Name": "EIR_Credentials",
      "CanBeDeleted": true,
      "ValueScope": "Global",
      "ValueType": "Credential",
      "Value": "username: ",
       ...
    }

When using the $expand RobotValues:

 "value": [
    {
      "Name": "EIR_Credentials",
      "CanBeDeleted": true,
      "ValueScope": "Global",
      "ValueType": "Credential",
      "Value": "username: FIN013P-BOT",
      ...
    }
3 Likes

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