0

As an admin, I want to have visibility of all the members of all groups present in a Google Workspace account with the help of an API. Is there any API to perform this action? If not, are there any alternatives?

I tried searching in Google's documentation. They have the Admin SDK Directory API to list all the members of a given group. But I need to have visibility of all members from all groups present in a Google Workspace account (not just one group at a time).

Fernando Lara
  • 2,263
  • 2
  • 4
  • 14

1 Answers1

1

What you need to do in this case is to use the groups.list method from the Admin SDK Directory API in order to list all the groups and obtain the group keys from all the groups. Once you get the group keys you can use the members.list method to list the member of each group using all the group keys you retrieved from listing all the groups.

For example, you could easily put all the group keys in an array and then create a loop that goes through the whole array using the members.list method with each group key value from the array.

See also:

IkkiL
  • 21
  • 2