Retrieves all groups of a domain or of a user given a userKey (paginated).
HTTP request
 GET https://admin.googleapis.com/admin/directory/v1/groups 
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
| customer |   The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of  | 
| domain |   The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the  | 
| maxResults |   Maximum number of results to return. Max allowed value is 200. | 
| orderBy |   Column to use for sorting results | 
| pageToken |   Token to specify next page in the list | 
| query |   Query string search. Contains one or more search clauses, each with a field, operator, and value. For complete documentation, go to Search for groups . | 
| sortOrder |   Whether to return results in ascending or descending order. Only of use when orderBy is also used | 
| userKey |   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. Cannot be used with the  | 
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
|  { 
 "kind" 
 : 
 string 
 , 
 "etag" 
 : 
 string 
 , 
 "groups" 
 : 
 [ 
 { 
 object (  | 
| Fields | |
|---|---|
| kind |   Kind of resource this is. | 
| etag |   ETag of the resource. | 
| groups[] |   A list of group objects. | 
| nextPageToken |   Token used to access next page of this result. | 
Authorization scopes
Requires one of the following OAuth scopes:
-  https://apps-apis.google.com/a/feeds/groups/
-  https://www.googleapis.com/auth/admin.directory.group
-  https://www.googleapis.com/auth/admin.directory.group.readonly
For more information, see the Authorization guide .
OrderBy
| Enums | |
|---|---|
| EMAIL | Email of the group. | 
SortOrder
| Enums | |
|---|---|
| ASCENDING | Ascending order. | 
| DESCENDING | Descending order. | 

