I would like to retrieve all groups for a given member. There is an api interface for this: https://developers.google.com/admin-sdk/directory/v1/guides/manage-groups#get_all_member_groups
But unfortunately I can't figure out how to do that using java SDK as I was not able to find a method for this. How can this problem be solved?
You don't need to add methods, you can use Directory.Groups.List and set the userKey parameter, something like
//... imports, initializations etc.
Directory service = new Directory.Builder(httpTransport, jsonFactory,
credential).build();
Groups userGroups = service.groups().list().setUserKey("[email protected]")
.execute();
answered Jul 15 '26 09:07
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With