Skip to main content

users

Overview

Nameusers
TypeResource
Idgoogleadmin.directory.users

Fields

NameDatatypeDescription
idstringThe unique ID for the user. A user id can be used as a user request URI's userKey.
nameobject
addressesanyThe list of the user's addresses. The maximum allowed data size for this field is 10KB.
agreedToTermsbooleanOutput only. This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
aliasesarrayOutput only. The list of the user's alias email addresses.
archivedbooleanIndicates if user is archived.
changePasswordAtNextLoginbooleanIndicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
creationTimestringUser's G Suite account creation time. (Read-only)
customSchemasobjectCustom fields of the user. The key is a schema_name and its values are 'field_name': 'field_value'.
customerIdstringOutput only. The customer ID to retrieve all account 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 request.
deletionTimestring
emailsanyThe list of the user's email addresses. The maximum allowed data size for this field is 10KB.
etagstringOutput only. ETag of the resource.
externalIdsanyThe list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
genderanyThe user's gender. The maximum allowed data size for this field is 1KB.
hashFunctionstringStores the hash format of the password property. The following hashFunction values are allowed: MD5 - Accepts simple hex-encoded values. SHA-1 - Accepts simple hex-encoded values. * crypt - Compliant with the C crypt library. Supports the DES, MD5 (hash prefix $1$), SHA-256 (hash prefix $5$), and SHA-512 (hash prefix $6$) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
imsanyThe list of 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.
includeInGlobalAddressListbooleanIndicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain. For more information about excluding user profiles, see the administration help center.
ipWhitelistedbooleanIf true, the user's IP address is subject to a deprecated IP address allowlist configuration.
isAdminbooleanOutput only. Indicates a user with super admininistrator privileges. The isAdmin property can only be edited in the Make a user an administrator operation ( makeAdmin method). If edited in the user insert or update methods, the edit is ignored by the API service.
isDelegatedAdminbooleanOutput only. Indicates if the user is a delegated administrator. Delegated administrators are supported by the API but cannot create or undelete users, or make users administrators. These requests are ignored by the API service. Roles and privileges for administrators are assigned using the Admin console.
isEnforcedIn2SvbooleanOutput only. Is 2-step verification enforced (Read-only)
isEnrolledIn2SvbooleanOutput only. Is enrolled in 2-step verification (Read-only)
isMailboxSetupbooleanOutput only. Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
keywordsanyThe list of the user's keywords. The maximum allowed data size for this field is 1KB.
kindstringOutput only. The type of the API resource. For Users resources, the value is admin#directory#user.
languagesanyThe user's languages. The maximum allowed data size for this field is 1KB.
lastLoginTimestringUser's last login time. (Read-only)
locationsanyThe user's locations. The maximum allowed data size for this field is 10KB.
nonEditableAliasesarrayOutput only. The list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
notesanyNotes for the user.
orgUnitPathstringThe 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 (/).
organizationsanyThe list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
passwordstringUser's password
phonesanyThe list of the user's phone numbers. The maximum allowed data size for this field is 1KB.
posixAccountsanyThe list of POSIX account information for the user.
primaryEmailstringThe 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.
recoveryEmailstringRecovery email of the user.
recoveryPhonestringRecovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
relationsanyThe list of the user's relationships to other users. The maximum allowed data size for this field is 2KB.
sshPublicKeysanyA list of SSH public keys.
suspendedbooleanIndicates if user is suspended.
suspensionReasonstringOutput 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.
thumbnailPhotoEtagstringOutput only. ETag of the user's photo (Read-only)
thumbnailPhotoUrlstringOutput only. The URL of the user's profile photo. The URL might be temporary or private.
websitesanyThe user's websites. The maximum allowed data size for this field is 2KB.

Methods

NameAccessible byRequired ParamsDescription
getSELECTuserKeyRetrieves a user.
listSELECTdomainRetrieves a paginated list of either deleted users or all users in a domain.
insertINSERTCreates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the "User creation is not complete" message to see if this is the case. Retrying the calls after some time can help in this case.
deleteDELETEuserKeyDeletes a user.
_listEXECdomainRetrieves a paginated list of either deleted users or all users in a domain.
makeAdminEXECuserKeyMakes a user a super administrator.
patchEXECuserKeyUpdates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you're mapping an external identity to a Google identity, use the update method instead of the patch method. This method is unable to clear fields that contain repeated objects (addresses, phones, etc). Use the update method instead.
signOutEXECuserKeySigns a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.
undeleteEXECuserKeyUndeletes a deleted user.
updateEXECuserKeyUpdates a user. This method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to null will be cleared. For repeating fields that contain arrays, individual items in the array can't be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the user accounts guide for more information.
watchEXECWatches for changes in users list.