Google Workspace Admin (Directory) (version v1.*.*)

add_group_alias#

Adds an alias for the group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

$body#

JSON template for Alias object in Directory API.

Type: object

{
"kind" : "string",
"alias" : "string",
"etag" : "string",
"id" : "string",
"primaryEmail" : "string"
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

add_member_to_group#

Adds a user to the specified group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

$body#

A Google Groups member can be a user or another group. This member can be inside or outside of your account's domains. For more information about common group member tasks, see the Developer's Guide.

Type: object

{
"role" : "The member's role in a group. The API returns an error for cycles in group memberships. For example, if `group1` is a member of `group2`, `group2` cannot be a member of `group1`. For more information about a member's role, see the [administration help center](https://support.google.com/a/answer/167094).",
"kind" : "The type of the API resource. For Members resources, the value is `admin#directory#member`.",
"etag" : "ETag of the resource.",
"id" : "The unique ID of the group member. A member `id` can be used as a member request URI's `memberKey`.",
"type" : "The type of group member.",
"email" : "The member's email address. A member can be a user or another group. This property is required when adding a member to a group. The `email` must be unique and cannot be an alias of another group. If the email address is changed, the API automatically reflects the email address changes.",
"delivery_settings" : "Defines mail delivery preferences of member. This is only supported by create/update/get.",
"status" : "Status of member (Immutable)"
}

add_user_alias#

Adds an alias.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

$body#

JSON template for Alias object in Directory API.

Type: object

{
"kind" : "string",
"alias" : "string",
"etag" : "string",
"id" : "string",
"primaryEmail" : "string"
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

add_user_photo#

Adds a photo for the user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

$body#

Type: object

{
"photoData" : "The user photo's upload data in [web-safe Base64](https://en.wikipedia.org/wiki/Base64#URL_applications) format in bytes. This means: * The slash (/) character is replaced with the underscore (_) character. * The plus sign (+) character is replaced with the hyphen (-) character. * The equals sign (=) character is replaced with the asterisk (*). * For padding, the period (.) character is used instead of the RFC-4648 baseURL definition which uses the equals sign (=) for padding. This is done to simplify URL-parsing. * Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels.",
"kind" : "The type of the API resource. For Photo resources, this is `admin#directory#user#photo`.",
"width" : "Width of the photo in pixels.",
"etag" : "ETag of the resource.",
"id" : "The ID the API uses to uniquely identify the user.",
"mimeType" : "The MIME type of the photo. Allowed values are `JPEG`, `PNG`, `GIF`, `BMP`, `TIFF`, and web-safe base64 encoding.",
"primaryEmail" : "The user's primary email address.",
"height" : "Height of the photo in pixels."
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

check_group_membership#

Checks whether the given user is a member of the group. Membership can be direct or nested.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

memberKey (required)#

Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

create_group#

Creates a group.

Parameters

$body#

Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the Developer's Guide.

Type: object

{
"aliases" : [ "string" ],
"kind" : "The type of the API resource. For Groups resources, the value is `admin#directory#group`.",
"name" : "The group's display name.",
"description" : "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.",
"etag" : "ETag of the resource.",
"nonEditableAliases" : [ "string" ],
"id" : "The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.",
"adminCreated" : "Value is `true` if this group was created by an administrator rather than a user.",
"directMembersCount" : "The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.",
"email" : "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details."
}

create_user#

Creates a user.

Parameters

$body#

The Directory API allows you to create and manage your account's users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the User Accounts Developer's Guide and the User Aliases Developer's Guide.

Type: object

{
"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 (`/`).",
"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.",
"addresses" : { },
"ipWhitelisted" : "If `true`, the user's IP address is [whitelisted](https://support.google.com/a/answer/60752).",
"aliases" : [ "string" ],
"notes" : { },
"creationTime" : "User's G Suite account creation time. (Read-only)",
"gender" : { },
"keywords" : { },
"isMailboxSetup" : "Output only. Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.",
"sshPublicKeys" : { },
"posixAccounts" : { },
"phones" : { },
"deletionTime" : "date-time",
"ims" : { },
"emails" : { },
"archived" : "Indicates if user is archived.",
"password" : "User's password",
"thumbnailPhotoUrl" : "Output only. Photo Url of the user (Read-only)",
"changePasswordAtNextLogin" : "Indicates 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](https://support.google.com/a/answer/60224).",
"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.",
"nonEditableAliases" : [ "string" ],
"id" : "The unique ID for the user. A user `id` can be used as a user request URI's `userKey`.",
"recoveryEmail" : "Recovery email of the user.",
"agreedToTerms" : "Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.",
"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.",
"includeInGlobalAddressList" : "Indicates 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](https://support.google.com/a/answer/1285988).",
"languages" : { },
"isEnrolledIn2Sv" : "Output only. Is enrolled in 2-step verification (Read-only)",
"kind" : "Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.",
"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`.",
"customSchemas" : "Custom fields of the user. The key is a `schema_name` and its values are `'field_name': 'field_value'`.",
"externalIds" : { },
"recoveryPhone" : "Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.",
"isAdmin" : "Output only. Indicates a user with super admininistrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](/admin-sdk/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](/admin-sdk/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](/admin-sdk/directory/v1/reference/users/insert.html) or [update](/admin-sdk/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.",
"suspended" : "Indicates if user is suspended.",
"lastLoginTime" : "User's last login time. (Read-only)",
"isDelegatedAdmin" : "Output 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](https://support.google.com/a/answer/33325).",
"isEnforcedIn2Sv" : "Output only. Is 2-step verification enforced (Read-only)",
"name" : {
"familyName" : "The user's last name. Required when creating a user account.",
"givenName" : "The user's first name. Required when creating a user account.",
"fullName" : "The user's full name formed by concatenating the first and last name values."
},
"organizations" : { },
"etag" : "Output only. ETag of the resource.",
"locations" : { },
"websites" : { },
"thumbnailPhotoEtag" : "Output only. ETag of the user's photo (Read-only)",
"relations" : { }
}

delete_group#

Deletes a group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_group_alias#

Removes an alias.

Parameters

alias (required)#

The alias to be removed

Type: string

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_member_from_group#

Removes a member from a group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

memberKey (required)#

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_user#

Deletes a user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_user_alias#

Removes an alias.

Parameters

alias (required)#

The alias to be removed.

Type: string

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_user_asp#

Deletes an ASP issued by a user.

Parameters

codeId (required)#

The unique ID of the ASP to be deleted.

Type: integer

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_user_photo#

Removes the user's photo.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

delete_user_tokens#

Deletes all access tokens issued by a user for an application.

Parameters

clientId (required)#

The Client ID of the application the token is issued to.

Type: string

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

edit_group#

Updates a group's properties. This method supports patch semantics.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

$body#

Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the Developer's Guide.

Type: object

{
"aliases" : [ "string" ],
"kind" : "The type of the API resource. For Groups resources, the value is `admin#directory#group`.",
"name" : "The group's display name.",
"description" : "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.",
"etag" : "ETag of the resource.",
"nonEditableAliases" : [ "string" ],
"id" : "The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.",
"adminCreated" : "Value is `true` if this group was created by an administrator rather than a user.",
"directMembersCount" : "The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.",
"email" : "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details."
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

generate_user_backup_verification_codes#

Generates new backup verification codes for the user.

Parameters

userKey (required)#

Email or immutable ID of the user

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_group#

Retrieves a group's properties.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_group_member#

Retrieves a group member's properties.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

memberKey (required)#

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_user#

Retrieves a user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

customFieldMask#

A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

projection#

What subset of fields to fetch for this user.

Type: string

Potential values: basic, custom, full

viewType#

Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

Type: string

Potential values: admin_view, domain_public

get_user_asp#

Gets information about an ASP issued by a user.

Parameters

codeId (required)#

The unique ID of the ASP.

Type: integer

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_user_backup_verification_codes#

Returns the current set of valid backup verification codes for the specified user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_user_photo#

Retrieves the user's photo.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

get_user_tokens#

Gets information about an access token issued by a user.

Parameters

clientId (required)#

The Client ID of the application the token is issued to.

Type: string

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

invalidate_user_backup_verification_codes#

Invalidates the current backup verification codes for the user.

Parameters

userKey (required)#

Email or immutable ID of the user

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

list_group_aliases#

Lists all aliases for a group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

list_groups#

Retrieves all groups of a domain or of a user given a userKey (paginated).

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, 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

Type: string

domain#

The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the customer query parameter instead.

Type: string

orderBy#

Column to use for sorting results

Type: string

Potential values: email

query#

Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups

Type: string

sortOrder#

Whether to return results in ascending or descending order. Only of use when orderBy is also used

Type: string

Potential values: ASCENDING, DESCENDING

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.

Type: string

list_members_in_group#

Retrieves a paginated list of all members in a group.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

includeDerivedMembership#

Whether to list indirect memberships. Default: false.

Type: boolean

roles#

The roles query parameter allows you to retrieve group members by role. Allowed values are OWNER, MANAGER, and MEMBER.

Type: string

list_user_aliases#

Lists all aliases for a user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

event#

Events to watch for.

Type: string

Potential values: add, delete

fields#

Selector specifying which fields to include in a partial response.

Type: string

list_user_asps#

Lists the ASPs issued by a user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

list_user_tokens#

Returns the set of tokens specified user has issued to 3rd party applications.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

list_users#

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

Parameters

customFieldMask#

A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

Type: string

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, 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.

Type: string

domain#

The domain name. Use this field to get groups 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.

Type: string

event#

Event on which subscription is intended (if subscribing)

Type: string

Potential values: add, delete, makeAdmin, undelete, update

orderBy#

Property to use for sorting results.

Type: string

Potential values: email, familyName, givenName

projection#

What subset of fields to fetch for this user.

Type: string

Potential values: basic, custom, full

query#

Query string for searching user fields. For more information on constructing user queries, see Search for Users.

Type: string

showDeleted#

If set to true, retrieves the list of deleted users. (Default: false)

Type: string

sortOrder#

Whether to return results in ascending or descending order.

Type: string

Potential values: ASCENDING, DESCENDING

viewType#

Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

Type: string

Potential values: admin_view, domain_public

make_user_an_admin#

Makes a user a super administrator.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

$body#

Type: object

{
"status" : "Indicates the administrator status of the user."
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

sign_out_user#

Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.

Parameters

userKey (required)#

Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

turn_off_user_two_step_verification#

Turns off 2-Step Verification for user.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

fields#

Selector specifying which fields to include in a partial response.

Type: string

undelete_user#

Undeletes a deleted user.

Parameters

userKey (required)#

The immutable id of the user

Type: string

$body#

Type: object

{
"orgUnitPath" : "OrgUnit of User"
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

update_group_properties#

Updates a group's properties.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

$body#

Google Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the Developer's Guide.

Type: object

{
"aliases" : [ "string" ],
"kind" : "The type of the API resource. For Groups resources, the value is `admin#directory#group`.",
"name" : "The group's display name.",
"description" : "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters.",
"etag" : "ETag of the resource.",
"nonEditableAliases" : [ "string" ],
"id" : "The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`.",
"adminCreated" : "Value is `true` if this group was created by an administrator rather than a user.",
"directMembersCount" : "The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group.",
"email" : "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details."
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

update_membership_in_group#

Updates the membership properties of a user in the specified group. This method supports patch semantics.

Parameters

groupKey (required)#

Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

Type: string

memberKey (required)#

Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

Type: string

$body#

A Google Groups member can be a user or another group. This member can be inside or outside of your account's domains. For more information about common group member tasks, see the Developer's Guide.

Type: object

{
"role" : "The member's role in a group. The API returns an error for cycles in group memberships. For example, if `group1` is a member of `group2`, `group2` cannot be a member of `group1`. For more information about a member's role, see the [administration help center](https://support.google.com/a/answer/167094).",
"kind" : "The type of the API resource. For Members resources, the value is `admin#directory#member`.",
"etag" : "ETag of the resource.",
"id" : "The unique ID of the group member. A member `id` can be used as a member request URI's `memberKey`.",
"type" : "The type of group member.",
"email" : "The member's email address. A member can be a user or another group. This property is required when adding a member to a group. The `email` must be unique and cannot be an alias of another group. If the email address is changed, the API automatically reflects the email address changes.",
"delivery_settings" : "Defines mail delivery preferences of member. This is only supported by create/update/get.",
"status" : "Status of member (Immutable)"
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

update_user#

Updates a user. This method supports patch semantics, meaning 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.

Parameters

userKey (required)#

Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

Type: string

$body#

The Directory API allows you to create and manage your account's users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the User Accounts Developer's Guide and the User Aliases Developer's Guide.

Type: object

{
"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 (`/`).",
"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.",
"addresses" : { },
"ipWhitelisted" : "If `true`, the user's IP address is [whitelisted](https://support.google.com/a/answer/60752).",
"aliases" : [ "string" ],
"notes" : { },
"creationTime" : "User's G Suite account creation time. (Read-only)",
"gender" : { },
"keywords" : { },
"isMailboxSetup" : "Output only. Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.",
"sshPublicKeys" : { },
"posixAccounts" : { },
"phones" : { },
"deletionTime" : "date-time",
"ims" : { },
"emails" : { },
"archived" : "Indicates if user is archived.",
"password" : "User's password",
"thumbnailPhotoUrl" : "Output only. Photo Url of the user (Read-only)",
"changePasswordAtNextLogin" : "Indicates 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](https://support.google.com/a/answer/60224).",
"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.",
"nonEditableAliases" : [ "string" ],
"id" : "The unique ID for the user. A user `id` can be used as a user request URI's `userKey`.",
"recoveryEmail" : "Recovery email of the user.",
"agreedToTerms" : "Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.",
"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.",
"includeInGlobalAddressList" : "Indicates 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](https://support.google.com/a/answer/1285988).",
"languages" : { },
"isEnrolledIn2Sv" : "Output only. Is enrolled in 2-step verification (Read-only)",
"kind" : "Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.",
"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`.",
"customSchemas" : "Custom fields of the user. The key is a `schema_name` and its values are `'field_name': 'field_value'`.",
"externalIds" : { },
"recoveryPhone" : "Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.",
"isAdmin" : "Output only. Indicates a user with super admininistrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](/admin-sdk/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](/admin-sdk/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](/admin-sdk/directory/v1/reference/users/insert.html) or [update](/admin-sdk/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.",
"suspended" : "Indicates if user is suspended.",
"lastLoginTime" : "User's last login time. (Read-only)",
"isDelegatedAdmin" : "Output 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](https://support.google.com/a/answer/33325).",
"isEnforcedIn2Sv" : "Output only. Is 2-step verification enforced (Read-only)",
"name" : {
"familyName" : "The user's last name. Required when creating a user account.",
"givenName" : "The user's first name. Required when creating a user account.",
"fullName" : "The user's full name formed by concatenating the first and last name values."
},
"organizations" : { },
"etag" : "Output only. ETag of the resource.",
"locations" : { },
"websites" : { },
"thumbnailPhotoEtag" : "Output only. ETag of the user's photo (Read-only)",
"relations" : { }
}

fields#

Selector specifying which fields to include in a partial response.

Type: string

watch_for_changes_in_users_list#

Watches for changes in users list.

Parameters

$body#

An notification channel used to watch for resource changes.

Type: object

{
"resourceId" : "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.",
"address" : "The address where notifications are delivered for this channel.",
"payload" : "A Boolean value to indicate whether payload is wanted. Optional.",
"kind" : "Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.",
"expiration" : "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
"id" : "A UUID or similar unique string that identifies this channel.",
"resourceUri" : "A version-specific identifier for the watched resource.",
"params" : "Additional parameters controlling delivery channel behavior. Optional.",
"type" : "The type of delivery mechanism used for this channel.",
"token" : "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
}

customFieldMask#

Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

Type: string

customer#

Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.

Type: string

domain#

Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead."

Type: string

event#

Events to watch for.

Type: string

Potential values: add, delete, makeAdmin, undelete, update

fields#

Selector specifying which fields to include in a partial response.

Type: string

maxResults#

Maximum number of results to return.

Type: integer

orderBy#

Column to use for sorting results

Type: string

Potential values: email, familyName, givenName

pageToken#

Token to specify next page in the list

Type: string

projection#

What subset of fields to fetch for this user.

Type: string

Potential values: basic, custom, full

query#

Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users

Type: string

showDeleted#

If set to true, retrieves the list of deleted users. (Default: false)

Type: string

sortOrder#

Whether to return results in ascending or descending order.

Type: string

Potential values: ASCENDING, DESCENDING

viewType#

Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

Type: string

Potential values: admin_view, domain_public

watch_user_alias_changes#

Watches for changes in users list.

Parameters

userKey (required)#

Email or immutable ID of the user

Type: string

$body#

An notification channel used to watch for resource changes.

Type: object

{
"resourceId" : "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.",
"address" : "The address where notifications are delivered for this channel.",
"payload" : "A Boolean value to indicate whether payload is wanted. Optional.",
"kind" : "Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.",
"expiration" : "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
"id" : "A UUID or similar unique string that identifies this channel.",
"resourceUri" : "A version-specific identifier for the watched resource.",
"params" : "Additional parameters controlling delivery channel behavior. Optional.",
"type" : "The type of delivery mechanism used for this channel.",
"token" : "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
}

event#

Events to watch for.

Type: string

Potential values: add, delete

fields#

Selector specifying which fields to include in a partial response.

Type: string