Symantec Privileged Access Management

 View Only

 How do I get targetaccountid using API call.

Gurumurthy Yadurappa's profile image
Gurumurthy Yadurappa posted May 05, 2021 11:05 AM
Hi,

Most of the API calls ask for targetaccountid as an input, like passwors.json. How do I get the targetaccountid on a given account name.

Thanks and Regards,
Guru
Ralf Prigl's profile image
Broadcom Employee Ralf Prigl
Hi Guru, Target accounts belong to target applications, which belong to devices. You use the "GET /api.php/v1/devices.json" to get the device ID, you use the "GET /api.php/v1/devices.json/{id}/targetApplications" resource to get the target application IDs for target applications associated with the device, and then you use the "GET /api.php/v1/devices.json/{deviceId}/targetApplications/{applicationId}/targetAccounts" resource to get the target account IDs for each target application. Alternatively you can use the remote CLI searchTargetAccount command to get target account IDs, see the other thread you opened today.