PVWA - Error "Account id value is invalid" when running Get Account Details RESTAPI
Symptom
When running Get account details RESTAPI, an error is thrown "Account id value is invalid" while having specified the correct account name / username as the parameter.
For example: https://<PVWA_Server_address>/PasswordVault/API/Accounts/root/
root is the account name or username.
Environment
12.6;13.0;13.2;14.0;14.2 Privileged Access Manager (PAM, self-hosted) Cyber-Ark API/SDK
PVWA
Cause
Wrong parameter is used. The expected parameter is the id of the account instead of the account name or username.
For example: https://<PVWA_Server_address>/PasswordVault/API/Accounts/{id}/
Reference docs:
https://docs.cyberark.com/pam-self-hosted/latest/en/content/webservices/get%20account%20details.htm
Resolution
- Find out the account's id by running Get Account RESTAPI.
For example: https://<PVWA_Server_address>/PasswordVault/API/Accounts
Reference docs:
https://docs.cyberark.com/pam-self-hosted/latest/en/content/sdk/getaccounts.htm
Example result:
{
"id": "12_4",
"name": "Operating System-UnixviaSSH-1.1.1.1-root",
"address": "1.1.1.1",
"userName": "root",
"platformId": "UnixviaSSH",
…
}
- Run the Get account details RESTAPI with the id in the parameter.
For example: https://<PVWA_Server_address>/PasswordVault/API/Accounts/12_4/