How to enable a CredFile to be used instead of Username/Password combo for API scripts (12.0 or below ONLY)

How to enable a CredFile to be used instead of Username/Password combo for API scripts (12.0 or below ONLY)

88
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:08 PM


Objective


How to enable a CredFile to be used instead of Username/Password combo for API scripts
 


Environment


12.1

Procedure



IMPORTANT NOTE: The credfile process has changed in version 12.1. If you are on version 12.1 or higher, please use directions from this article  instead. DO NOT use this article.


1. Create a user in the vault using the GUI. Make sure to it has access to the PVWA. Restrict its permissions to the minimum necessary based on the actions you are going to take.
2. Using a command line go to the PVWA install folder and navigate to the Env folder.
- Run "CreateCredFile.exe WSUser.ini Password /Username {username} /Password {password} /AppType PVWAApp /ExePath "c:\windows\system32\inetsrv\w3wp.exe" /EntropyFile /DPAPIMachineProtection"
- Enter the username of the user created in step 1
- Enter that username's password
- Use the default settings for the rest of the prompts
3. Take the WSUser.ini file and the WsUser.ini.entropy file created in the Env folder, cut it, and place it in the CredFiles folder of the PVWA install folder
4. Back in Env, open and edit Web.config
- paste the following line in the appSettings section:
<add key="WSCredentialFile" value="C:\CyberArk\Password Vault Web Access\CredFiles\WSUser.ini"/>
- Make sure the file path is correct, the path provided is the default path
- Save Web.config
5. Use the REST API shared logon method (not the standard logon method !) - it will return a token, that you will be able to use in your next method (similar to the standard logon method).
 


Actions
  • Print
  • Copy Link

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