blob: 0087802d9842837fdb40176bef69dcc1e71c7bfb [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="admin_directory_v1.html">Admin SDK API</a> . <a href="admin_directory_v1.users.html">users</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="admin_directory_v1.users.aliases.html">aliases()</a></code>
</p>
<p class="firstline">Returns the aliases Resource.</p>
<p class="toc_element">
<code><a href="admin_directory_v1.users.photos.html">photos()</a></code>
</p>
<p class="firstline">Returns the photos Resource.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#delete">delete(userKey, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a user.</p>
<p class="toc_element">
<code><a href="#get">get(userKey, customFieldMask=None, projection=None, viewType=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves a user.</p>
<p class="toc_element">
<code><a href="#insert">insert(body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a user.</p>
<p class="toc_element">
<code><a href="#list">list(customFieldMask=None, customer=None, domain=None, event=None, maxResults=None, orderBy=None, pageToken=None, projection=None, query=None, showDeleted=None, sortOrder=None, viewType=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves a paginated list of either deleted users or all users in a domain.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#makeAdmin">makeAdmin(userKey, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Makes a user a super administrator.</p>
<p class="toc_element">
<code><a href="#patch">patch(userKey, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.</p>
<p class="toc_element">
<code><a href="#signOut">signOut(userKey, x__xgafv=None)</a></code></p>
<p class="firstline">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.</p>
<p class="toc_element">
<code><a href="#undelete">undelete(userKey, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Undeletes a deleted user.</p>
<p class="toc_element">
<code><a href="#update">update(userKey, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">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.</p>
<p class="toc_element">
<code><a href="#watch">watch(body=None, customFieldMask=None, customer=None, domain=None, event=None, maxResults=None, orderBy=None, pageToken=None, projection=None, query=None, showDeleted=None, sortOrder=None, viewType=None, x__xgafv=None)</a></code></p>
<p class="firstline">Watches for changes in users list.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(userKey, x__xgafv=None)</code>
<pre>Deletes a user.
Args:
userKey: string, Identifies the user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
</pre>
</div>
<div class="method">
<code class="details" id="get">get(userKey, customFieldMask=None, projection=None, viewType=None, x__xgafv=None)</code>
<pre>Retrieves a user.
Args:
userKey: string, Identifies the user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
customFieldMask: string, A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
projection: string, What subset of fields to fetch for this user.
Allowed values
basic - Do not include any custom fields for the user.
custom - Include custom fields from schemas requested in `customFieldMask`.
full - Include all fields associated with this user.
viewType: string, 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](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
Allowed values
admin_view - Results include both administrator-only and domain-public fields for the user.
domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}</pre>
</div>
<div class="method">
<code class="details" id="insert">insert(body=None, x__xgafv=None)</code>
<pre>Creates a user.
Args:
body: object, The request body.
The object takes the form of:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(customFieldMask=None, customer=None, domain=None, event=None, maxResults=None, orderBy=None, pageToken=None, projection=None, query=None, showDeleted=None, sortOrder=None, viewType=None, x__xgafv=None)</code>
<pre>Retrieves a paginated list of either deleted users or all users in a domain.
Args:
customFieldMask: string, A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
customer: string, The unique ID for the customer&#x27;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&#x27;s `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). Either the `customer` or the `domain` parameter must be provided.
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. Either the `customer` or the `domain` parameter must be provided.
event: string, Event on which subscription is intended (if subscribing)
Allowed values
add - User Created Event
delete - User Deleted Event
makeAdmin - User Admin Status Change Event
undelete - User Undeleted Event
update - User Updated Event
maxResults: integer, Maximum number of results to return.
orderBy: string, Property to use for sorting results.
Allowed values
email - Primary email of the user.
familyName - User&#x27;s family name.
givenName - User&#x27;s given name.
pageToken: string, Token to specify next page in the list
projection: string, What subset of fields to fetch for this user.
Allowed values
basic - Do not include any custom fields for the user.
custom - Include custom fields from schemas requested in `customFieldMask`.
full - Include all fields associated with this user.
query: string, Query string for searching user fields. For more information on constructing user queries, see [Search for Users](/admin-sdk/directory/v1/guides/search-users).
showDeleted: string, If set to `true`, retrieves the list of deleted users. (Default: `false`)
sortOrder: string, Whether to return results in ascending or descending order.
Allowed values
ASCENDING - Ascending order.
DESCENDING - Descending order.
viewType: string, 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](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
Allowed values
admin_view - Results include both administrator-only and domain-public fields for the user.
domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{
&quot;etag&quot;: &quot;A String&quot;, # ETag of the resource.
&quot;kind&quot;: &quot;admin#directory#users&quot;, # Kind of resource this is.
&quot;nextPageToken&quot;: &quot;A String&quot;, # Token used to access next page of this result.
&quot;trigger_event&quot;: &quot;A String&quot;, # Event that triggered this response (only used in case of Push Response)
&quot;users&quot;: [ # List of user objects.
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="makeAdmin">makeAdmin(userKey, body=None, x__xgafv=None)</code>
<pre>Makes a user a super administrator.
Args:
userKey: string, Identifies the user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
body: object, The request body.
The object takes the form of:
{
&quot;status&quot;: True or False, # Indicates the administrator status of the user.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(userKey, body=None, x__xgafv=None)</code>
<pre>Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.
Args:
userKey: string, Identifies the user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
body: object, The request body.
The object takes the form of:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}</pre>
</div>
<div class="method">
<code class="details" id="signOut">signOut(userKey, x__xgafv=None)</code>
<pre>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.
Args:
userKey: string, Identifies the target user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
</pre>
</div>
<div class="method">
<code class="details" id="undelete">undelete(userKey, body=None, x__xgafv=None)</code>
<pre>Undeletes a deleted user.
Args:
userKey: string, The immutable id of the user (required)
body: object, The request body.
The object takes the form of:
{
&quot;orgUnitPath&quot;: &quot;A String&quot;, # OrgUnit of User
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
</pre>
</div>
<div class="method">
<code class="details" id="update">update(userKey, body=None, x__xgafv=None)</code>
<pre>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.
Args:
userKey: string, Identifies the user in the API request. The value can be the user&#x27;s primary email address, alias email address, or unique user ID. (required)
body: object, The request body.
The object takes the form of:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](/admin-sdk/directory/v1/guides/manage-user-aliases.html).
&quot;addresses&quot;: &quot;&quot;, # A list of the user&#x27;s addresses. The maximum allowed data size for this field is 10Kb.
&quot;agreedToTerms&quot;: True or False, # Output only. This property is `true` if the user has completed an initial login and accepted the Terms of Service agreement.
&quot;aliases&quot;: [ # Output only. A list of the user&#x27;s alias email addresses.
&quot;A String&quot;,
],
&quot;archived&quot;: True or False, # Indicates if user is archived.
&quot;changePasswordAtNextLogin&quot;: True or False, # Indicates if the user is forced to change their password at next login. This setting doesn&#x27;t apply when [the user signs in via a third-party identity provider](https://support.google.com/a/answer/60224).
&quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
&quot;customSchemas&quot;: { # Custom fields of the user. The key is a `schema_name` and its values are `&#x27;field_name&#x27;: &#x27;field_value&#x27;`.
&quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
&quot;a_key&quot;: &quot;&quot;,
},
},
&quot;customerId&quot;: &quot;A String&quot;, # 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&#x27;s `customerId`. As a reseller administrator, you can use the resold customer account&#x27;s `customerId`. To get a `customerId`, use the account&#x27;s primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.
&quot;deletionTime&quot;: &quot;A String&quot;,
&quot;emails&quot;: &quot;&quot;, # A list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10Kb.
&quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
&quot;externalIds&quot;: &quot;&quot;, # 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.
&quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1Kb.
&quot;hashFunction&quot;: &quot;A String&quot;, # 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.
&quot;id&quot;: &quot;A String&quot;, # The unique ID for the user. A user `id` can be used as a user request URI&#x27;s `userKey`.
&quot;ims&quot;: &quot;&quot;, # The user&#x27;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.
&quot;includeInGlobalAddressList&quot;: True or False, # Indicates if the user&#x27;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).
&quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is [whitelisted](https://support.google.com/a/answer/60752).
&quot;isAdmin&quot;: True or False, # 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.
&quot;isDelegatedAdmin&quot;: True or False, # 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).
&quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
&quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
&quot;isMailboxSetup&quot;: True or False, # Output only. Indicates if the user&#x27;s Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
&quot;keywords&quot;: &quot;&quot;, # The user&#x27;s keywords. The maximum allowed data size for this field is 1Kb.
&quot;kind&quot;: &quot;admin#directory#user&quot;, # Output only. The type of the API resource. For Users resources, the value is `admin#directory#user`.
&quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1Kb.
&quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
&quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10Kb.
&quot;name&quot;: { # Holds the given and family names of the user, and the read-only `fullName` value. The maximum number of characters in the `givenName` and in the `familyName` values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the [administration help center](https://support.google.com/a/answer/9193374). Maximum allowed data size for this field is 1Kb.
&quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
&quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
&quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
},
&quot;nonEditableAliases&quot;: [ # Output only. List of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
&quot;A String&quot;,
],
&quot;notes&quot;: &quot;&quot;, # Notes for the user.
&quot;orgUnitPath&quot;: &quot;A String&quot;, # 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 (`/`).
&quot;organizations&quot;: &quot;&quot;, # A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.
&quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
&quot;phones&quot;: &quot;&quot;, # A list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1Kb.
&quot;posixAccounts&quot;: &quot;&quot;, # A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
&quot;primaryEmail&quot;: &quot;A String&quot;, # The user&#x27;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.
&quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
&quot;recoveryPhone&quot;: &quot;A String&quot;, # Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.
&quot;relations&quot;: &quot;&quot;, # A list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2Kb.
&quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
&quot;suspended&quot;: True or False, # Indicates if user is suspended.
&quot;suspensionReason&quot;: &quot;A String&quot;, # 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`.
&quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
&quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. Photo Url of the user (Read-only)
&quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2Kb.
}</pre>
</div>
<div class="method">
<code class="details" id="watch">watch(body=None, customFieldMask=None, customer=None, domain=None, event=None, maxResults=None, orderBy=None, pageToken=None, projection=None, query=None, showDeleted=None, sortOrder=None, viewType=None, x__xgafv=None)</code>
<pre>Watches for changes in users list.
Args:
body: object, The request body.
The object takes the form of:
{ # An notification channel used to watch for resource changes.
&quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
&quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
&quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
&quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.
&quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
&quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
&quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
&quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
&quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
}
customFieldMask: string, Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
customer: string, 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.
domain: string, 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.&quot;
event: string, Events to watch for.
Allowed values
add - User Created Event
delete - User Deleted Event
makeAdmin - User Admin Status Change Event
undelete - User Undeleted Event
update - User Updated Event
maxResults: integer, Maximum number of results to return.
orderBy: string, Column to use for sorting results
Allowed values
email - Primary email of the user.
familyName - User&#x27;s family name.
givenName - User&#x27;s given name.
pageToken: string, Token to specify next page in the list
projection: string, What subset of fields to fetch for this user.
Allowed values
basic - Do not include any custom fields for the user.
custom - Include custom fields from schemas mentioned in customFieldMask.
full - Include all fields associated with this user.
query: string, Query string search. Should be of the form &quot;&quot;. Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users
showDeleted: string, If set to true, retrieves the list of deleted users. (Default: false)
sortOrder: string, Whether to return results in ascending or descending order.
Allowed values
ASCENDING - Ascending order.
DESCENDING - Descending order.
viewType: string, 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](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).
Allowed values
admin_view - Results include both administrator-only and domain-public fields.
domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An notification channel used to watch for resource changes.
&quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
&quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
&quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
&quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.
&quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
&quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
&quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
&quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
&quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
}</pre>
</div>
</body></html>