I have a piece of code(in Java) to list all members
of a group on a personal Google Apps Domain. This uses the google Directory API.
Here is the snippet:
public static void listMembers(String groupKey,Directory service) throws IOException {
Members res = service.members().list(groupKey).execute();
List<Member> members = res.getMembers();
int count = 0;
if (members == null || members.size() == 0) {
System.out.println();
System.out.println("No members found.");
} else {
System.out.println();
System.out.println("Members of "+groupKey);
for (Member member : members) {
count++;
System.out.println(member.getEmail());
}
System.out.println(count);
}
}
This works fine, but for any group, not more than exactly 200 members
are listed, though a group actually has more users. I tried to search for the limit on the members.list()
function that I am using, but couldn't find it on the Google Documentation for the Directory API. Is there any such limit? If yes, can I somehow list all users?