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