How to enable/disable user via REST API

How to enable/disable user via REST API

119
Created On 11/10/26 10:53 AM - Last Modified 11/10/26 15:52 PM


Symptom


The disable and enable user REST API were newly introduced in PVWA REST 12.6 and not available in PVWA REST 12.2.


Please refer to the following documentation on API specifications:

REST 12.2 :

https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/12.2/en/Content/SDK/API%20Commands%20-%20User%20Web%20Services.htm?tocpath=Developer%7CREST%20APIs%7CUser%20management%7CUsers%7C_____0


Rest 12.6 :

https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/12.6/en/Content/SDK/API%20Commands%20-%20User%20Web%20Services.htm?tocpath=Developer%7CREST%20APIs%7CUser%20management%7CUsers%7C_____0


EnableUser : {{pasBaseURL}}/passwordvault/api/users/{{pasUserID}}/enable

DisableUser : {{pasBaseURL}}/passwordvault/api/users/{{pasUserID}}/disable



In both API above, the pasUserID parameter should be the user "id" instead of "username".

As an example, the JSON result of GetUsers returned the following record:

---------------------------------

"id": 138,

"username": "domainuser03",

--------------------------------


Based on the API specifications, invoke the EnableUser and DisableUser API with the following values (eg. 138 instead of domainuser03):


EnableUser : {{pasBaseURL}}/passwordvault/api/users/138/enable

DisableUser : {{pasBaseURL}}/passwordvault/api/users/138/disable





Environment


12.6 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access Password Vault Web Access Other

Actions
  • Print
  • Copy Link

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