Groups: list

Retrieve all groups of a domain or of a user given a userKey (paginated) Try it now.


HTTP request



Parameter name Value Description
Optional query parameters
customer string The unique ID for the customer's G Suite account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.
domain string The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the customer query parameter instead.
maxResults integer Maximum number of results to return. Max allowed value is 200.
orderBy string Column to use for sorting results

Acceptable values are:
  • "email": Email of the group.
pageToken string Token to specify next page in the list
query string Query string search. Should be of the form "". Complete documentation is at
sortOrder string Whether to return results in ascending or descending order. Only of use when orderBy is also used

Acceptable values are:
  • "ASCENDING": Ascending order.
  • "DESCENDING": Descending order.
userKey string Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.


This request requires authorization with at least one of the following scopes:


For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "admin#directory#groups",
  "etag": etag,
  "groups": [
    groups Resource
  "nextPageToken": string
Property name Value Description Notes
kind string The type of the API resource. For Groups resources, the value is admin#directory#group.
groups[] list List of group objects.
nextPageToken string Token used to access next page of this result.
etag etag ETag of the resource.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.