KSC Open API  13.1
Kaspersky Security Center API description
wstring Tasks::UpdateCredPasswords ( wstring  wstrUser,
wstring  wstrPass,
wstring  wstrOldPass,
array  pActions 
)

Update tasks credentials passwords.

Change password for tasks credentials.

Parameters:
wstrUser(wstring) Name of user
wstrPass(wstring) New password
wstrOldPass(wstring) Old password (optional)
pActions(array) tasks credentials actions (optional)
Returns:
(wstring) Request ID used to subscribe to the event that is triggered when operation is complete.
Remarks:
Check the operation state by calling AsyncActionStateChecker::CheckActionState periodically until it's finalized or cancel it by calling Tasks::CancelUpdateCredPasswords. If the operation succeeds then AsyncActionStateChecker::CheckActionState returns array of credentials update results for tasks in pStateData. Otherwise, a call to AsyncActionStateChecker::CheckActionState returns error in pStateData.

Below is the structure of pActions array.

            +--- (array)
                +---0 (paramParams)
                    +---TASK_UNIQUE_ID = (paramString)"101" // Task Id
                    +---PRTS_TASK_ACTION = (paramInt) 0 // task password action
            

PRTS_TASK_ACTION Possible values:

  • 0 - delete credentials;
  • 1 - forced password change, even if the old password is wrong or not provided;

Below is the structure of pStateData container.

            +--- (params)
                +---PRTS_TASK_RESULTS (array)
                |   +---0 (paramParams)
                |       +---DisplayName = (paramString)"TestTask" //Task display name
                |       +---PRTS_TASK_GROUPNAME = (paramString)"Managed devices" // Administration group display name
                |       +---PRTS_TASK_RESULT = (paramInt)1 // Result of password change
                |       +---PRTS_TASK_VSERVERNAME = (paramString)"" // Virtual server name
                |       +---TASK_UNIQUE_ID = (paramString)"101" // Task Id
            

PRTS_TASK_RESULT Possible values:

  • -1 - Error;
  • 0 - Password not changed;
  • 1 - Password changed;
  • 2 - Change need approve;