2

Is there an API to get the list of all Google groups a user is part of (of course, with his/her permission) and vice versa (given a Google group, get all users part of that group).

Jay Lee
  • 13,415
  • 3
  • 28
  • 59
Neo
  • 3,465
  • 5
  • 26
  • 37

2 Answers2

2

The Google Apps Provisioning API lets you retrieve the current memberships for a Google Apps user as well as list all members of a Google Apps Google Group. However, there is no way to do this for consumer (@gmail.com) Google Accounts and regular (@googlegroups.com) Google Groups.

Jay Lee
  • 13,415
  • 3
  • 28
  • 59
  • Yes. I meant it for Google Apps only. I understand this is possible only with an administrator account (obviously, as the API can also be used to add/delete users). For a non-administrator, could it be possible to just "read" user/group info? – Neo Dec 27 '12 at 13:50
  • No, only Google Apps admins can access the Provisioning API: https://developers.google.com/google-apps/provisioning/#getting_started – Jay Lee Dec 27 '12 at 13:54
1

Also it need not be Google Apps Provisioning. They also have gdata Services and retrieve Groups function. For example if you have an user example@domain.com, then you can use RetrieveGroups(String memberId, bool directOnly) where memberId is the email address and directOnly must be set to True. This works sleek.