REST API - How to add Reconcile and Login Accounts to an Account using V10 REST API

REST API - How to add Reconcile and Login Accounts to an Account using V10 REST API

96
Created On 11/10/26 10:31 AM - Last Modified 11/10/26 12:59 PM


Objective


How to add Reconcile and Login Accounts to an Account using V10 REST API

Environment


10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1

Procedure


For Privileged Cloud and Versions 12.1 and higher
A new REST API has been added to allow for linking of accounts without needing to update the platforms. 

The default values for the index is as follows:
  1. Logon Account
  2. Enable Account
  3. Reconcile Account
For details on which index corresponds to which type of linking on a platform refer to

Platform Properties -> UI and Workflows ->Linked Accounts

image.png

https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/12.1/en/Content/WebServices/Linked-accounts.htm

For versions 12.0 and lower
When using the new V10 REST APIs,  Logon and Reconcile accounts can be added to an account, but first the relevant properties need to be defined for the platform.

The way to do this is to define the relevant properties for the Logon and Reconcile accounts as optional properties in the platform properties. Then it is possible to specify values for these properties in the Add account and Update account REST APIs.

Step 1 - add the properties to the platform
In "Administration - Platform Management" select the platform that is used for the accounts.
Select Edit to edit the platform.
Expand "UI & Workflows"
Expand Properties
Right click on "Optional" and select "Add Property" to add Optional Properties to the platform. Add the following six properties:
     Name - ExtraPass1Folder,  DisplayName - Logon Account Folder
     Name - ExtraPass1Name, DisplayName - Logon Account Name
     Name - ExtraPass1Safe, DisplayName - Logon Account Safe
     Name - ExtraPass3Folder, DisplayName - Reconcile Account Folder
     Name - ExtraPass3Name, DisplayName - Reconcile Account Name
     Name - ExtraPass3Safe. DisplayName - Reconcile Account Safe

Step 2 - add Logon and Reconcile accounts when creating accounts using the Add account REST API
In the body of the Add account REST API (https://<IIS_Server_Ip>/PasswordVault/api/Accounts) HTTP method = POST, add the following lines:
    
"platformAccountProperties": {
            "ExtraPass1Folder":"Root",
            "ExtraPass1Name":"LogonAccountName",
            "ExtraPass1Safe":"LogonAccountSafe",
            "ExtraPass3Folder":"Root",
            "ExtraPass3Name":"ReconcileAccountName",
            "ExtraPass3Safe":"ReconcileAccountSafe"
    },


where LogonAccountName and ReconcileAccountName are the "name" of the Logon and Reconcile accounts respectively (as seen in the Classic UI account details page or in the "name" field in the response to the add Account or Get Accounts REST APIs.)
and where LogonAccountSafe and ReconcileAccountSafe are the safes where the Logon and Reconcile accounts are stored.

Step 3 - for already existing accounts, the Logon and Reconcile accounts can be added using the Update account REST API
Call the Update account REST API (https://<IIS_Server_Ip>/PasswordVault/api/Accounts/{AccountID}) HTTP method = PATCH, once for each property to be added.
For example, to add the Safe of the Logon account call Update account with the following body:
 
[
    { "op": "add", "path": "/platformAccountProperties/extraPass1Safe", "value": "LogonAccountSafe"}
]

Call Update account additional times as needed to add the remaining properties, replacing the operation in the body above with one of the following lines:    
 { "op": "add", "path": "/platformAccountProperties/ExtraPass1Folder", "value": "Root"}
    { "op": "add", "path": "/platformAccountProperties/ExtraPass1Name", "value": "LogonAccountName"}
    { "op": "add", "path": "/platformAccountProperties/ExtraPass3Folder", "value": "Root"}
    { "op": "add", "path": "/platformAccountProperties/ExtraPass3Name", "value": "ReconcileAccountName"}
    { "op": "add", "path": "/platformAccountProperties/ExtraPass3Safe", "value": "ReconcileAccountSafe"}


Update account should be called three times to add the Logon account properties and another three times to add the Reconcile account properties. 

Note: In 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000jJhCAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail