KSC Open API
Kaspersky Security Center API description
RspAdUaRelation::RelationAdd ( wstring  wstrUaHostId,
wstring  wstrAdDomain,
array  pDomainConrollers,
wstring  wstrLogin,
binary  pPassword 
)

Add relation between UA and Active Directory controllers.

Adds the relation between the specified UA and Active Directory controllers to perform XDRO responses when it will be needed

To list added relations use SrvView Relation between Active Directory domain controllers and Update Agents

Parameters:
wstrUaHostIdGUID host name of the UA or empty string for Administration Server's Network Agent
wstrAdDomainActive Directory domain name in lowercase FQDN format, e.g. "mycompany.com"
pDomainConrollersnon-empty array of strings, each of string is a domain controller address (it may be either DNS name or NetBIOS name or IP address)
wstrLoginlogin of the Active Directory user able to perform XDRO response
pPasswordActive Directory user password protected with DataProtectionApi::ProtectUtf8StringGlobally method
Note:
if wstrUaHostId is empty then current session must target the physical server otherwise exception STDE_NOTPERM is thrown
Exceptions:
STDE_NOTPERMOperation is prohibited (e.g. wstrUaHostId does not have UA role, or an attempt to access physical server in context of virtual one, or this feature is disabled)