Might be the token type. This one seems app-based, so it shows only public groups. Maybe try a user token to see if it changes the result.
Original Message:
Sent: 10-23-2025 09:46
From: Giampiero Casu
Subject: How to get all groups with post_groups_search API (Python), not just public ones?
------------------------------
Giampiero Casu
Original Message:
Sent: 10-23-2025 06:11
From: Jan Heinonen
Subject: How to get all groups with post_groups_search API (Python), not just public ones?
Hi,
I haven't tested it with APIs but if you have the permission Directory > privateGroup > View I would expect it to show the private groups as well.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-22-2025 09:24
From: Giampiero Casu
Subject: How to get all groups with post_groups_search API (Python), not just public ones?
Hi,
I'm trying to get a list of the names and IDs of all configured groups in Python.
Using the following code, I only get some groups in the response, not all of them.
api_instance_SearchApi = PureCloudPlatformClientV2.SearchApi(api_client)
body = PureCloudPlatformClientV2.GroupSearchRequest()
api_response_SearchApi = api_instance_SearchApi.post_groups_search(body)
In particular, it seems to me that the response only contains groups with visibility='public'.
Even using PureCloudPlatformClientV2.SCIMApi(api_client) + get_scim_groups (without filters) gives me the same result.
I'm not getting all the configured groups, only those with Visibility=Public.
Is there a way to get all the groups, not just those with visibility='public'?
Thanks so much for your support.
#PlatformAPI
------------------------------
Giampy
------------------------------