How to resync the API credfile for the PSM

How to resync the API credfile for the PSM

169
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 15:51 PM


Objective


The executable 'apikeymanager.exe' is used to manage the credential file that is needed for the PSM. The file is located in your PSM installation directory, by default it is:
C:\Program Files (x86)\CyberArk\PSM\Vault

The PSMApp username can be found in the psmapp.cred file, located in the same vault directory mentioned above.


Environment


10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.5;12.6;13.0;14.6 Privileged Access Manager (PAM, self-hosted) PSM

Procedure


1) Stop the service "Cyber-Ark Privileged Session Manager"

2) Navigate to your PSM installation directory, vault folder as described in the introduction above and open an administrative command prompt window to this folder. the commands below will be run in this CMDwindow.

Revoke API key:
apikeymanager.exe revoke -t <PSMApp username> -u <vault administrator username> -a "<https://<PVWA_FQDN>/PasswordVault/api/>"
 
For example:
ApiKeyManager.exe revoke -t PSMAppxxxxxxx -u administrator -a "https://xxx.xxx/passwordVault/api"
(NOTE: change relevant values where required)
 
 
Create a new API key:
ApiKeyManager.exe add -f "<PSM installation folder path>\Vault\apigw.cred>" -t <PSMApp username> -u <vault username> -a "<https://<pvwa hostname>/passwordVault/api>"
 
For example:
ApiKeyManager.exe add -f "C:\Program Files (x86)\CyberArk\PSM\Vault\apigw.cred" -t PSMAppxxxxxx -u administrator -a "https://xxx.xxx/passwordVault/api"
(NOTE: change relevant values where required).
 
 
vault.ini configuration:
Update/Ensure the Addresses and ApiKeyPath parameters in the vault.ini file exist and are accurate. If either are missing, add them. They need to be at the bottom of the vault.ini file under a header [API], don't put these entries anywhere else.

[API]
Addresses="<PVWA url>/api"
ApiKeyPath="<PSM installation folder path>\Vault\apigw.cred"

 

3) You may now start the PSM service again.

Final note, if the need arises you can also update the existing key pair with the following command:
 
ApiKeyManager.exe update -f "<PSM installation folder path>\Vault\apigw.cred"> -t <PSMApp username> -u <vault username> -a "https://<pvwa hostname>/passwordVault/api"


Actions
  • Print
  • Copy Link

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