Export groups via the Platform API

Hi all, i am trying to extract all the groups with the use of Java Platform SDK. It seems that if i use Oauth2 client credentials (master admin with all divisions assigned to this client ID so no restrictions), i get only 25 groups but there are actual 29 groups which I can list if i run the same code with implicit grant using the SDK or with the developer API tools.

The code is have a very simply:
List criteriaGroups = new ArrayList<>();
criteriaGroups.add("name");

GroupSearchCriteria groupSearchCriteria = new GroupSearchCriteria();
groupSearchCriteria.setType(TypeEnum.REQUIRED_FIELDS);
groupSearchCriteria.setFields(criteriaGroups);

List<GroupSearchCriteria> queryGroup = new ArrayList<>();
GroupSearchRequest groupSearchRequest = new GroupSearchRequest();
groupSearchRequest.setPageNumber(1);
groupSearchRequest.setPageSize(100);
groupSearchRequest.setQuery(queryGroup);

GroupsSearchResponse groupsSearchResponse = groupsApi.postGroupsSearch(groupSearchRequest);

the search string looks good too (and it works with implicit grant so it shouldnt be a search issue):
GroupSearchRequest {
sortOrder: null
sortBy: null
pageSize: 100
pageNumber: 1
sort: []
query: []
}

Is there anything I am missing? the API should return the groups for which the user is not part of (in fact the client credential has no user so this client is not part of any group). Why do i have some groups which are not downloading using client credentials?

Thansk,
Zsolt

There's a good chance it's a configuration issue with divisions, but I don't have access to your org's data to verify. Check to make sure everything is configured as intended. If you're still unable to get all the groups after validating your setup, please open a case with Genesys Cloud Care to investigate why certain groups aren't showing up in the result.

yes, that what i thought so but i double checked and all divisions are added with master admin and that is the maximum permission that can be given. Anyway, we will open a genesys case too to check it with a support engineer.
Zsolt

For others looking for the the solution: the Oauth2 client credential has no user context so private groups will not be available/visible. The workaround is to set group privacy temporarily to public for the update and that should do the job. privacy can be restored after the update.
Zsolt

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.