Skip to main content

List Users

Retrieves a paginated list of either deleted users or all users in a domain.

Basic Parameters

ParameterDescription
Customer IDThe unique ID for the customer's Google Workspace account. In case
of a multi-domain account, to fetch all groups for a customer, fill this field
instead of domain. 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
. Either the customer or the
domain parameter must be provided.
DomainThe 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. Either the customer or the domain parameter must be provided.
QueryQuery string for searching user fields. For more information on constructing user queries, see Search for Users.

Advanced Parameters

ParameterDescription
Delegated User OverridePerform the action on behalf of another user, overriding the delegated user defined in the connection.

If not specified, the delegated user is the one provided in the connection.

Has no effect when using an OAuth connection.

NOTE: the connection details are not edited by this input.
Max ResultsMaximum number of results to return.
Page TokenToken to specify next page in the list.

Example Output

{
"etag": "ETag of the resource.",
"kind": "admin#directory#users",
"nextPageToken": "Token used to access next page of this result.",
"trigger_event": "Event that triggered this response (only used in case of Push Response)",
"users": [
{
"addresses": "A list of the user's addresses. The maximum allowed data size for this field is 10Kb.",
"agreedToTerms": false,
"aliases": [
"string"
],
"archived": false,
"changePasswordAtNextLogin": false,
"creationTime": "User's G Suite account creation time. (Read-only)",
"customSchemas": {},
"customerId": "Output only. The customer ID to [retrieve all account users](/admin-sdk/directory/v1/guides/manage-users.html#get_all_users). You can use the alias `my_customer` to represent your account's `customerId`. As a reseller administrator, you can use the resold customer account's `customerId`. To get a `customerId`, use the account's primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.",
"deletionTime": "date-time",
"emails": "A list of the user's email addresses. The maximum allowed data size for this field is 10Kb.",
"etag": "Output only. ETag of the resource.",
"externalIds": "A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2Kb.",
"gender": "The user's gender. The maximum allowed data size for this field is 1Kb.",
"hashFunction": "Stores the hash format of the password property. We recommend sending the `password` property value as a base 16 bit hexadecimal-encoded hash value. Set the `hashFunction` values as either the [SHA-1](https://wikipedia.org/wiki/SHA-1), [MD5](https://wikipedia.org/wiki/MD5), or [crypt](https://en.wikipedia.org/wiki/Crypt_\\(C\\)) hash format.",
"id": "The unique ID for the user. A user `id` can be used as a user request URI's `userKey`.",
"ims": "The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size for this field is 2Kb.",
"includeInGlobalAddressList": false,
"ipWhitelisted": false,
"isAdmin": false,
"isDelegatedAdmin": false,
"isEnforcedIn2Sv": false,
"isEnrolledIn2Sv": false,
"isMailboxSetup": false,
"keywords": "The user's keywords. The maximum allowed data size for this field is 1Kb.",
"kind": "admin#directory#user",
"languages": "The user's languages. The maximum allowed data size for this field is 1Kb.",
"lastLoginTime": "User's last login time. (Read-only)",
"locations": "The user's locations. The maximum allowed data size for this field is 10Kb.",
"name": {
"familyName": "The user's last name. Required when creating a user account.",
"fullName": "The user's full name formed by concatenating the first and last name values.",
"givenName": "The user's first name. Required when creating a user account."
},
"nonEditableAliases": [
"string"
],
"notes": "Notes for the user.",
"orgUnitPath": "The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (`/`).",
"organizations": "A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.",
"password": "User's password",
"phones": "A list of the user's phone numbers. The maximum allowed data size for this field is 1Kb.",
"posixAccounts": "A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.",
"primaryEmail": "The user's primary email address. This property is required in a request to create a user account. The `primaryEmail` must be unique and cannot be an alias of another user.",
"recoveryEmail": "Recovery email of the user.",
"recoveryPhone": "Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.",
"relations": "A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.",
"sshPublicKeys": "A list of SSH public keys.",
"suspended": false,
"suspensionReason": "Output only. Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the `suspended` property is `true`.",
"thumbnailPhotoEtag": "Output only. ETag of the user's photo (Read-only)",
"thumbnailPhotoUrl": "Output only. Photo Url of the user (Read-only)",
"websites": "The user's websites. The maximum allowed data size for this field is 2Kb."
}
]
}

Workflow Library Example

List Users with Google Workspace and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop