Debian Codegraph @

docs/dyn/admin_directory_v1.users.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="admin_directory_v1.html">Admin SDK API</a> . <a href="admin_directory_v1.users.html">users</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="admin_directory_v1.users.aliases.html">aliases()</a></code>
79 </p>
80 <p class="firstline">Returns the aliases Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="admin_directory_v1.users.photos.html">photos()</a></code>
84 </p>
85 <p class="firstline">Returns the photos Resource.</p>
86
87 <p class="toc_element">
88 <code><a href="#close">close()</a></code></p>
89 <p class="firstline">Close httplib2 connections.</p>
90 <p class="toc_element">
91 <code><a href="#createGuest">createGuest(body=None, x__xgafv=None)</a></code></p>
92 <p class="firstline">Create a guest user with access to a [subset of Workspace capabilities](https://support.google.com/a/answer/16558545). This feature is currently in Open Beta.</p>
93 <p class="toc_element">
94 <code><a href="#delete">delete(userKey, x__xgafv=None)</a></code></p>
95 <p class="firstline">Deletes a user.</p>
96 <p class="toc_element">
97 <code><a href="#get">get(userKey, customFieldMask=None, projection=None, viewType=None, x__xgafv=None)</a></code></p>
98 <p class="firstline">Retrieves a user.</p>
99 <p class="toc_element">
100 <code><a href="#insert">insert(body=None, resolveConflictAccount=None, x__xgafv=None)</a></code></p>
101 <p class="firstline">Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the "User creation is not complete" message to see if this is the case. Retrying the calls after some time can help in this case. If `resolveConflictAccount` is set to `true`, a `202` response code means that a conflicting unmanaged account exists and was invited to join the organization. A `409` response code means that a conflicting account exists so the user wasn't created based on the [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) option selected.</p>
102 <p class="toc_element">
103 <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>
104 <p class="firstline">Retrieves a paginated list of either deleted users or all users in a domain.</p>
105 <p class="toc_element">
106 <code><a href="#list_next">list_next()</a></code></p>
107 <p class="firstline">Retrieves the next page of results.</p>
108 <p class="toc_element">
109 <code><a href="#makeAdmin">makeAdmin(userKey, body=None, x__xgafv=None)</a></code></p>
110 <p class="firstline">Makes a user a super administrator.</p>
111 <p class="toc_element">
112 <code><a href="#patch">patch(userKey, body=None, x__xgafv=None)</a></code></p>
113 <p class="firstline">Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you're mapping an external identity to a Google identity, use the [`update`](https://developers.google.com/workspace/admin/directory/v1/reference/users/update) method instead of the `patch` method. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.</p>
114 <p class="toc_element">
115 <code><a href="#signOut">signOut(userKey, x__xgafv=None)</a></code></p>
116 <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>
117 <p class="toc_element">
118 <code><a href="#undelete">undelete(userKey, body=None, x__xgafv=None)</a></code></p>
119 <p class="firstline">Undeletes a deleted user.</p>
120 <p class="toc_element">
121 <code><a href="#update">update(userKey, body=None, x__xgafv=None)</a></code></p>
122 <p class="firstline">Updates a user. This method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to `null` will be cleared. For repeating fields that contain arrays, individual items in the array can't be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the [user accounts guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#update_user) for more information.</p>
123 <p class="toc_element">
124 <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>
125 <p class="firstline">Watches for changes in users list.</p>
126 <h3>Method Details</h3>
127 <div class="method">
128 <code class="details" id="close">close()</code>
129 <pre>Close httplib2 connections.</pre>
130 </div>
131
132 <div class="method">
133 <code class="details" id="createGuest">createGuest(body=None, x__xgafv=None)</code>
134 <pre>Create a guest user with access to a [subset of Workspace capabilities](https://support.google.com/a/answer/16558545). This feature is currently in Open Beta.
135
136 Args:
137 body: object, The request body.
138 The object takes the form of:
139
140 { # Directory users guest creation request message.
141 &quot;customer&quot;: &quot;A String&quot;, # Optional. Immutable ID of the Google Workspace account. Only required when request is created by a service account. Defaults to the authenticated user&#x27;s customer ID otherwise.
142 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Required. External email of the guest user being created.
143 }
144
145 x__xgafv: string, V1 error format.
146 Allowed values
147 1 - v1 error format
148 2 - v2 error format
149
150 Returns:
151 An object of the form:
152
153 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
154 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
155 &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.
156 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
157 &quot;A String&quot;,
158 ],
159 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
160 &quot;archived&quot;: True or False, # Indicates if user is archived.
161 &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).
162 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
163 &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;`.
164 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
165 &quot;a_key&quot;: &quot;&quot;,
166 },
167 },
168 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
169 &quot;deletionTime&quot;: &quot;A String&quot;,
170 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
171 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
172 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
173 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
174 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
175 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
176 },
177 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
178 &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`.
179 &quot;ims&quot;: &quot;&quot;, # The list of 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.
180 &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).
181 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
182 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
183 &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).
184 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
185 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
186 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
187 &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.
188 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
189 &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`.
190 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
191 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
192 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
193 &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.
194 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
195 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
196 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
197 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
198 },
199 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
200 &quot;A String&quot;,
201 ],
202 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
203 &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 (`/`).
204 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
205 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
206 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
207 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
208 &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.
209 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
210 &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*.
211 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
212 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
213 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
214 &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`.
215 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
216 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
217 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
218 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
219 }</pre>
220 </div>
221
222 <div class="method">
223 <code class="details" id="delete">delete(userKey, x__xgafv=None)</code>
224 <pre>Deletes a user.
225
226 Args:
227 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)
228 x__xgafv: string, V1 error format.
229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
232 </pre>
233 </div>
234
235 <div class="method">
236 <code class="details" id="get">get(userKey, customFieldMask=None, projection=None, viewType=None, x__xgafv=None)</code>
237 <pre>Retrieves a user.
238
239 Args:
240 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)
241 customFieldMask: string, A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
242 projection: string, What subset of fields to fetch for this user.
243 Allowed values
244 basic - Do not include any custom fields for the user.
245 custom - Include custom fields from schemas requested in `customFieldMask`.
246 full - Include all fields associated with this user.
247 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](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin).
248 Allowed values
249 admin_view - Results include both administrator-only and domain-public fields for the user.
250 domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
251 x__xgafv: string, V1 error format.
252 Allowed values
253 1 - v1 error format
254 2 - v2 error format
255
256 Returns:
257 An object of the form:
258
259 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
260 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
261 &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.
262 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
263 &quot;A String&quot;,
264 ],
265 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
266 &quot;archived&quot;: True or False, # Indicates if user is archived.
267 &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).
268 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
269 &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;`.
270 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
271 &quot;a_key&quot;: &quot;&quot;,
272 },
273 },
274 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
275 &quot;deletionTime&quot;: &quot;A String&quot;,
276 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
277 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
278 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
279 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
280 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
281 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
282 },
283 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
284 &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`.
285 &quot;ims&quot;: &quot;&quot;, # The list of 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.
286 &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).
287 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
288 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
289 &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).
290 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
291 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
292 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
293 &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.
294 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
295 &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`.
296 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
297 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
298 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
299 &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.
300 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
301 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
302 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
303 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
304 },
305 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
306 &quot;A String&quot;,
307 ],
308 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
309 &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 (`/`).
310 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
311 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
312 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
313 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
314 &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.
315 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
316 &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*.
317 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
318 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
319 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
320 &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`.
321 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
322 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
323 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
324 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
325 }</pre>
326 </div>
327
328 <div class="method">
329 <code class="details" id="insert">insert(body=None, resolveConflictAccount=None, x__xgafv=None)</code>
330 <pre>Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn&#x27;t fully created due to propagation delay in our backends. Check the error details for the &quot;User creation is not complete&quot; message to see if this is the case. Retrying the calls after some time can help in this case. If `resolveConflictAccount` is set to `true`, a `202` response code means that a conflicting unmanaged account exists and was invited to join the organization. A `409` response code means that a conflicting account exists so the user wasn&#x27;t created based on the [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) option selected.
331
332 Args:
333 body: object, The request body.
334 The object takes the form of:
335
336 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
337 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
338 &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.
339 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
340 &quot;A String&quot;,
341 ],
342 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
343 &quot;archived&quot;: True or False, # Indicates if user is archived.
344 &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).
345 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
346 &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;`.
347 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
348 &quot;a_key&quot;: &quot;&quot;,
349 },
350 },
351 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
352 &quot;deletionTime&quot;: &quot;A String&quot;,
353 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
354 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
355 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
356 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
357 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
358 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
359 },
360 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
361 &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`.
362 &quot;ims&quot;: &quot;&quot;, # The list of 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.
363 &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).
364 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
365 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
366 &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).
367 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
368 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
369 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
370 &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.
371 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
372 &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`.
373 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
374 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
375 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
376 &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.
377 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
378 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
379 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
380 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
381 },
382 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
383 &quot;A String&quot;,
384 ],
385 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
386 &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 (`/`).
387 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
388 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
389 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
390 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
391 &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.
392 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
393 &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*.
394 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
395 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
396 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
397 &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`.
398 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
399 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
400 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
401 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
402 }
403
404 resolveConflictAccount: boolean, Optional. If set to `true`, the option selected for [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) will apply. Default: `false`
405 x__xgafv: string, V1 error format.
406 Allowed values
407 1 - v1 error format
408 2 - v2 error format
409
410 Returns:
411 An object of the form:
412
413 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
414 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
415 &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.
416 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
417 &quot;A String&quot;,
418 ],
419 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
420 &quot;archived&quot;: True or False, # Indicates if user is archived.
421 &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).
422 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
423 &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;`.
424 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
425 &quot;a_key&quot;: &quot;&quot;,
426 },
427 },
428 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
429 &quot;deletionTime&quot;: &quot;A String&quot;,
430 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
431 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
432 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
433 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
434 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
435 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
436 },
437 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
438 &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`.
439 &quot;ims&quot;: &quot;&quot;, # The list of 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.
440 &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).
441 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
442 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
443 &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).
444 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
445 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
446 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
447 &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.
448 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
449 &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`.
450 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
451 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
452 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
453 &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.
454 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
455 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
456 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
457 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
458 },
459 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
460 &quot;A String&quot;,
461 ],
462 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
463 &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 (`/`).
464 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
465 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
466 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
467 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
468 &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.
469 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
470 &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*.
471 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
472 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
473 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
474 &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`.
475 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
476 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
477 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
478 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
479 }</pre>
480 </div>
481
482 <div class="method">
483 <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>
484 <pre>Retrieves a paginated list of either deleted users or all users in a domain.
485
486 Args:
487 customFieldMask: string, A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.
488 customer: string, The unique ID for the customer&#x27;s Google Workspace account. In case of a multi-domain account, to fetch all users for a customer, use 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](https://developers.google.com/workspace/admin/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter.
489 domain: string, The domain name. Use this field to get users 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.
490 event: string, Event on which subscription is intended (if subscribing)
491 Allowed values
492 add - User Created Event
493 delete - User Deleted Event
494 makeAdmin - User Admin Status Change Event
495 undelete - User Undeleted Event
496 update - User Updated Event
497 maxResults: integer, Maximum number of results to return.
498 orderBy: string, Property to use for sorting results.
499 Allowed values
500 email - Primary email of the user.
501 familyName - User&#x27;s family name.
502 givenName - User&#x27;s given name.
503 pageToken: string, Token to specify next page in the list. The page token is only valid for three days.
504 projection: string, What subset of fields to fetch for this user.
505 Allowed values
506 basic - Do not include any custom fields for the user.
507 custom - Include custom fields from schemas requested in `customFieldMask`.
508 full - Include all fields associated with this user.
509 query: string, Query string for searching user fields. For more information on constructing user queries, see [Search for Users](https://developers.google.com/workspace/admin/directory/v1/guides/search-users).
510 showDeleted: string, If set to `true`, retrieves the list of deleted users. (Default: `false`)
511 sortOrder: string, Whether to return results in ascending or descending order, ignoring case.
512 Allowed values
513 ASCENDING - Ascending order.
514 DESCENDING - Descending order.
515 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](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin).
516 Allowed values
517 admin_view - Results include both administrator-only and domain-public fields for the user.
518 domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
519 x__xgafv: string, V1 error format.
520 Allowed values
521 1 - v1 error format
522 2 - v2 error format
523
524 Returns:
525 An object of the form:
526
527 {
528 &quot;etag&quot;: &quot;A String&quot;, # ETag of the resource.
529 &quot;kind&quot;: &quot;admin#directory#users&quot;, # Kind of resource this is.
530 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token used to access next page of this result. The page token is only valid for three days.
531 &quot;trigger_event&quot;: &quot;A String&quot;, # Event that triggered this response (only used in case of Push Response)
532 &quot;users&quot;: [ # A list of user objects.
533 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
534 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
535 &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.
536 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
537 &quot;A String&quot;,
538 ],
539 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
540 &quot;archived&quot;: True or False, # Indicates if user is archived.
541 &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).
542 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
543 &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;`.
544 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
545 &quot;a_key&quot;: &quot;&quot;,
546 },
547 },
548 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
549 &quot;deletionTime&quot;: &quot;A String&quot;,
550 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
551 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
552 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
553 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
554 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
555 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
556 },
557 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
558 &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`.
559 &quot;ims&quot;: &quot;&quot;, # The list of 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.
560 &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).
561 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
562 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
563 &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).
564 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
565 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
566 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
567 &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.
568 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
569 &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`.
570 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
571 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
572 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
573 &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.
574 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
575 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
576 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
577 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
578 },
579 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
580 &quot;A String&quot;,
581 ],
582 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
583 &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 (`/`).
584 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
585 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
586 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
587 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
588 &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.
589 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
590 &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*.
591 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
592 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
593 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
594 &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`.
595 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
596 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
597 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
598 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
599 },
600 ],
601 }</pre>
602 </div>
603
604 <div class="method">
605 <code class="details" id="list_next">list_next()</code>
606 <pre>Retrieves the next page of results.
607
608 Args:
609 previous_request: The request for the previous page. (required)
610 previous_response: The response from the request for the previous page. (required)
611
612 Returns:
613 A request object that you can call &#x27;execute()&#x27; on to request the next
614 page. Returns None if there are no more items in the collection.
615 </pre>
616 </div>
617
618 <div class="method">
619 <code class="details" id="makeAdmin">makeAdmin(userKey, body=None, x__xgafv=None)</code>
620 <pre>Makes a user a super administrator.
621
622 Args:
623 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)
624 body: object, The request body.
625 The object takes the form of:
626
627 {
628 &quot;status&quot;: True or False, # Indicates the administrator status of the user.
629 }
630
631 x__xgafv: string, V1 error format.
632 Allowed values
633 1 - v1 error format
634 2 - v2 error format
635 </pre>
636 </div>
637
638 <div class="method">
639 <code class="details" id="patch">patch(userKey, body=None, x__xgafv=None)</code>
640 <pre>Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you&#x27;re mapping an external identity to a Google identity, use the [`update`](https://developers.google.com/workspace/admin/directory/v1/reference/users/update) method instead of the `patch` method. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.
641
642 Args:
643 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)
644 body: object, The request body.
645 The object takes the form of:
646
647 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
648 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
649 &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.
650 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
651 &quot;A String&quot;,
652 ],
653 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
654 &quot;archived&quot;: True or False, # Indicates if user is archived.
655 &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).
656 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
657 &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;`.
658 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
659 &quot;a_key&quot;: &quot;&quot;,
660 },
661 },
662 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
663 &quot;deletionTime&quot;: &quot;A String&quot;,
664 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
665 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
666 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
667 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
668 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
669 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
670 },
671 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
672 &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`.
673 &quot;ims&quot;: &quot;&quot;, # The list of 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.
674 &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).
675 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
676 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
677 &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).
678 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
679 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
680 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
681 &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.
682 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
683 &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`.
684 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
685 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
686 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
687 &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.
688 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
689 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
690 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
691 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
692 },
693 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
694 &quot;A String&quot;,
695 ],
696 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
697 &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 (`/`).
698 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
699 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
700 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
701 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
702 &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.
703 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
704 &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*.
705 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
706 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
707 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
708 &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`.
709 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
710 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
711 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
712 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
713 }
714
715 x__xgafv: string, V1 error format.
716 Allowed values
717 1 - v1 error format
718 2 - v2 error format
719
720 Returns:
721 An object of the form:
722
723 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
724 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
725 &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.
726 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
727 &quot;A String&quot;,
728 ],
729 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
730 &quot;archived&quot;: True or False, # Indicates if user is archived.
731 &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).
732 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
733 &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;`.
734 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
735 &quot;a_key&quot;: &quot;&quot;,
736 },
737 },
738 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
739 &quot;deletionTime&quot;: &quot;A String&quot;,
740 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
741 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
742 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
743 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
744 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
745 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
746 },
747 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
748 &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`.
749 &quot;ims&quot;: &quot;&quot;, # The list of 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.
750 &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).
751 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
752 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
753 &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).
754 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
755 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
756 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
757 &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.
758 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
759 &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`.
760 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
761 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
762 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
763 &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.
764 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
765 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
766 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
767 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
768 },
769 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
770 &quot;A String&quot;,
771 ],
772 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
773 &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 (`/`).
774 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
775 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
776 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
777 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
778 &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.
779 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
780 &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*.
781 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
782 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
783 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
784 &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`.
785 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
786 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
787 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
788 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
789 }</pre>
790 </div>
791
792 <div class="method">
793 <code class="details" id="signOut">signOut(userKey, x__xgafv=None)</code>
794 <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.
795
796 Args:
797 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)
798 x__xgafv: string, V1 error format.
799 Allowed values
800 1 - v1 error format
801 2 - v2 error format
802 </pre>
803 </div>
804
805 <div class="method">
806 <code class="details" id="undelete">undelete(userKey, body=None, x__xgafv=None)</code>
807 <pre>Undeletes a deleted user.
808
809 Args:
810 userKey: string, The immutable id of the user (required)
811 body: object, The request body.
812 The object takes the form of:
813
814 {
815 &quot;orgUnitPath&quot;: &quot;A String&quot;, # OrgUnit of User
816 }
817
818 x__xgafv: string, V1 error format.
819 Allowed values
820 1 - v1 error format
821 2 - v2 error format
822 </pre>
823 </div>
824
825 <div class="method">
826 <code class="details" id="update">update(userKey, body=None, x__xgafv=None)</code>
827 <pre>Updates a user. This method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to `null` will be cleared. For repeating fields that contain arrays, individual items in the array can&#x27;t be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the [user accounts guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#update_user) for more information.
828
829 Args:
830 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)
831 body: object, The request body.
832 The object takes the form of:
833
834 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
835 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
836 &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.
837 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
838 &quot;A String&quot;,
839 ],
840 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
841 &quot;archived&quot;: True or False, # Indicates if user is archived.
842 &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).
843 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
844 &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;`.
845 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
846 &quot;a_key&quot;: &quot;&quot;,
847 },
848 },
849 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
850 &quot;deletionTime&quot;: &quot;A String&quot;,
851 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
852 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
853 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
854 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
855 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
856 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
857 },
858 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
859 &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`.
860 &quot;ims&quot;: &quot;&quot;, # The list of 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.
861 &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).
862 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
863 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
864 &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).
865 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
866 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
867 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
868 &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.
869 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
870 &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`.
871 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
872 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
873 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
874 &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.
875 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
876 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
877 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
878 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
879 },
880 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
881 &quot;A String&quot;,
882 ],
883 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
884 &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 (`/`).
885 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
886 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
887 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
888 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
889 &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.
890 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
891 &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*.
892 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
893 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
894 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
895 &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`.
896 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
897 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
898 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
899 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
900 }
901
902 x__xgafv: string, V1 error format.
903 Allowed values
904 1 - v1 error format
905 2 - v2 error format
906
907 Returns:
908 An object of the form:
909
910 { # The Directory API allows you to create and manage your account&#x27;s users, user aliases, and user Google profile photos. For more information about common tasks, see the [User Accounts Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html) and the [User Aliases Developer&#x27;s Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-user-aliases.html).
911 &quot;addresses&quot;: &quot;&quot;, # The list of the user&#x27;s addresses. The maximum allowed data size for this field is 10KB.
912 &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.
913 &quot;aliases&quot;: [ # Output only. The list of the user&#x27;s alias email addresses.
914 &quot;A String&quot;,
915 ],
916 &quot;archivalTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account archival time. (Read-only)
917 &quot;archived&quot;: True or False, # Indicates if user is archived.
918 &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).
919 &quot;creationTime&quot;: &quot;A String&quot;, # User&#x27;s G Suite account creation time. (Read-only)
920 &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;`.
921 &quot;a_key&quot;: { # JSON template for a set of custom properties (i.e. all fields in a particular schema)
922 &quot;a_key&quot;: &quot;&quot;,
923 },
924 },
925 &quot;customerId&quot;: &quot;A String&quot;, # Output only. The customer ID to [retrieve all account users](https://developers.google.com/workspace/admin/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](https://developers.google.com/workspace/admin/directory/v1/reference/users/list) request.
926 &quot;deletionTime&quot;: &quot;A String&quot;,
927 &quot;emails&quot;: &quot;&quot;, # The list of the user&#x27;s email addresses. The maximum allowed data size for this field is 10KB. This excludes `publicKeyEncryptionCertificates`.
928 &quot;etag&quot;: &quot;A String&quot;, # Output only. ETag of the resource.
929 &quot;externalIds&quot;: &quot;&quot;, # The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB.
930 &quot;gender&quot;: &quot;&quot;, # The user&#x27;s gender. The maximum allowed data size for this field is 1KB.
931 &quot;guestAccountInfo&quot;: { # Account info specific to Guest users. # Immutable. Additional guest-related metadata fields
932 &quot;primaryGuestEmail&quot;: &quot;A String&quot;, # Immutable. The guest&#x27;s external email.
933 },
934 &quot;hashFunction&quot;: &quot;A String&quot;, # Stores the hash format of the `password` property. The following `hashFunction` values are allowed: * `MD5` - Accepts simple hex-encoded values. * `SHA-1` - Accepts simple hex-encoded values. * `crypt` - Compliant with the [C crypt library](https://en.wikipedia.org/wiki/Crypt_%28C%29). Supports the DES, MD5 (hash prefix `$1$`), SHA-256 (hash prefix `$5$`), and SHA-512 (hash prefix `$6$`) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer.
935 &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`.
936 &quot;ims&quot;: &quot;&quot;, # The list of 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.
937 &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).
938 &quot;ipWhitelisted&quot;: True or False, # If `true`, the user&#x27;s IP address is subject to a deprecated IP address [`allowlist`](https://support.google.com/a/answer/60752) configuration.
939 &quot;isAdmin&quot;: True or False, # Output only. Indicates a user with super administrator privileges. The `isAdmin` property can only be edited in the [Make a user an administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users.html#make_admin) operation ( [makeAdmin](https://developers.google.com/workspace/admin/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](https://developers.google.com/workspace/admin/directory/v1/reference/users/insert.html) or [update](https://developers.google.com/workspace/admin/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service.
940 &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).
941 &quot;isEnforcedIn2Sv&quot;: True or False, # Output only. Is 2-step verification enforced (Read-only)
942 &quot;isEnrolledIn2Sv&quot;: True or False, # Output only. Is enrolled in 2-step verification (Read-only)
943 &quot;isGuestUser&quot;: True or False, # Immutable. Indicates if the inserted user is a guest.
944 &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.
945 &quot;keywords&quot;: &quot;&quot;, # The list of the user&#x27;s keywords. The maximum allowed data size for this field is 1KB.
946 &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`.
947 &quot;languages&quot;: &quot;&quot;, # The user&#x27;s languages. The maximum allowed data size for this field is 1KB.
948 &quot;lastLoginTime&quot;: &quot;A String&quot;, # User&#x27;s last login time. (Read-only)
949 &quot;locations&quot;: &quot;&quot;, # The user&#x27;s locations. The maximum allowed data size for this field is 10KB.
950 &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.
951 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name. Limit: 256 characters.
952 &quot;familyName&quot;: &quot;A String&quot;, # The user&#x27;s last name. Required when creating a user account.
953 &quot;fullName&quot;: &quot;A String&quot;, # The user&#x27;s full name formed by concatenating the first and last name values.
954 &quot;givenName&quot;: &quot;A String&quot;, # The user&#x27;s first name. Required when creating a user account.
955 },
956 &quot;nonEditableAliases&quot;: [ # Output only. The list of the user&#x27;s non-editable alias email addresses. These are typically outside the account&#x27;s primary domain or sub-domain.
957 &quot;A String&quot;,
958 ],
959 &quot;notes&quot;: &quot;&quot;, # Notes for the user.
960 &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 (`/`).
961 &quot;organizations&quot;: &quot;&quot;, # The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB.
962 &quot;password&quot;: &quot;A String&quot;, # User&#x27;s password
963 &quot;phones&quot;: &quot;&quot;, # The list of the user&#x27;s phone numbers. The maximum allowed data size for this field is 1KB.
964 &quot;posixAccounts&quot;: &quot;&quot;, # The list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.
965 &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.
966 &quot;recoveryEmail&quot;: &quot;A String&quot;, # Recovery email of the user.
967 &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*.
968 &quot;relations&quot;: &quot;&quot;, # The list of the user&#x27;s relationships to other users. The maximum allowed data size for this field is 2KB.
969 &quot;sshPublicKeys&quot;: &quot;&quot;, # A list of SSH public keys.
970 &quot;suspended&quot;: True or False, # Indicates if user is suspended.
971 &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`.
972 &quot;suspensionTime&quot;: &quot;A String&quot;, # Output only. User&#x27;s account suspension time. (Read-only)
973 &quot;thumbnailPhotoEtag&quot;: &quot;A String&quot;, # Output only. ETag of the user&#x27;s photo (Read-only)
974 &quot;thumbnailPhotoUrl&quot;: &quot;A String&quot;, # Output only. The URL of the user&#x27;s profile photo. The URL might be temporary or private.
975 &quot;websites&quot;: &quot;&quot;, # The user&#x27;s websites. The maximum allowed data size for this field is 2KB.
976 }</pre>
977 </div>
978
979 <div class="method">
980 <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>
981 <pre>Watches for changes in users list.
982
983 Args:
984 body: object, The request body.
985 The object takes the form of:
986
987 { # An notification channel used to watch for resource changes.
988 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
989 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
990 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
991 &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`.
992 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional. For example, `params.ttl` specifies the time-to-live in seconds for the notification channel, where the default is 2 hours and the maximum TTL is 2 days.
993 &quot;a_key&quot;: &quot;A String&quot;,
994 },
995 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
996 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
997 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
998 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
999 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
1000 }
1001
1002 customFieldMask: string, Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
1003 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.
1004 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;
1005 event: string, Events to watch for.
1006 Allowed values
1007 add - User Created Event
1008 delete - User Deleted Event
1009 makeAdmin - User Admin Status Change Event
1010 undelete - User Undeleted Event
1011 update - User Updated Event
1012 maxResults: integer, Maximum number of results to return.
1013 orderBy: string, Column to use for sorting results
1014 Allowed values
1015 email - Primary email of the user.
1016 familyName - User&#x27;s family name.
1017 givenName - User&#x27;s given name.
1018 pageToken: string, Token to specify next page in the list
1019 projection: string, What subset of fields to fetch for this user.
1020 Allowed values
1021 basic - Do not include any custom fields for the user.
1022 custom - Include custom fields from schemas mentioned in customFieldMask.
1023 full - Include all fields associated with this user.
1024 query: string, Query string search. Contains one or more search clauses, each with a field, operator, and value. For complete documentation, go to [Search for users](https://developers.google.com/workspace/admin/directory/v1/guides/search-users).
1025 showDeleted: string, If set to true, retrieves the list of deleted users. (Default: false)
1026 sortOrder: string, Whether to return results in ascending or descending order.
1027 Allowed values
1028 ASCENDING - Ascending order.
1029 DESCENDING - Descending order.
1030 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](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin).
1031 Allowed values
1032 admin_view - Results include both administrator-only and domain-public fields.
1033 domain_public - Results only include fields for the user that are publicly visible to other users in the domain.
1034 x__xgafv: string, V1 error format.
1035 Allowed values
1036 1 - v1 error format
1037 2 - v2 error format
1038
1039 Returns:
1040 An object of the form:
1041
1042 { # An notification channel used to watch for resource changes.
1043 &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
1044 &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
1045 &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
1046 &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`.
1047 &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional. For example, `params.ttl` specifies the time-to-live in seconds for the notification channel, where the default is 2 hours and the maximum TTL is 2 days.
1048 &quot;a_key&quot;: &quot;A String&quot;,
1049 },
1050 &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
1051 &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
1052 &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
1053 &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
1054 &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
1055 }</pre>
1056 </div>
1057
1058 </body></html>