PVWA - REST Get groups API does not return members
Symptom
In PVWA RESTv12.0 and above, a new function was introduced in the "get groups" API to display the users contained within a group in the vault. Online documentation url https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/WebServices/GetGroupsFromVault.htm.
Issue description:
When running the "get groups" API without any additional parameters added, https://<IIS_Server_Ip>/PasswordVault/api/UserGroups, the json result returns empty array for the members parameter regardless of whether the group contains any members.
Environment
12.0 Cyber-Ark API/SDK Other
Cause
For this feature to work, an additional API parameter (includeMembers) was introduced. "includeMembers" is currently designed to be defaulted to value of "false" unless specified in the url due to performance considerations.
Resolution
The group members will not be displayed unless you add the flag called includeMembers. Its default value is false.
The API request should be as follows:
{{BaseURL}}/PasswordVault/api/UserGroups?includeMembers=true