Create User
Creates a user.
Basic Parameters
Parameter | Description |
---|---|
Change Password At Next Login | Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider. |
Family Name | The user's last name. Required when creating a user account. |
First Name | The user's first name. Required when creating a user account. |
Password | User's password. |
Primary Email | The user's primary email address. This property is required in a request to create a user account. The primaryEmail must be unique and cannot be an alias of another user. |
Advanced Parameters
Parameter | Description |
---|---|
Custom Fields | A JSON object of Custom fields of the user. The custom fields are grouped by schema in standard JSON format. Single-valued custom fields are set as simple key-value pairs, like "field1": "value1". Multi-valued custom fields are set as arrays of objects, like the standard multi-value fields in the API such as organizations and relations. Example: { "schema1": { "field1": "value1", "field2": [ { "value": "value2a" }, { "value": "value2b" }, ... ], ... }, "schema2": { "field3": "value3", ... }, ... } |
Delegated User Override | Perform the action on behalf of another user, overriding the delegated user defined in the connection. If not specified, the delegated user is the one provided in the connection. Has no effect when using an OAuth connection. NOTE: the connection details are not edited by this input. |
External IDs | A JSON list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2Kb. Example input with detailed fields: [ { "value": "The value of the external ID.", "type": "The type of external ID. If set to custom, customType must also be set. Acceptable values: account, custom, customer, login_id, network, organization.", "customType": "If the external ID type is custom, this property contains the custom value and must be set." } ] |
Organizations | A JSON list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb. Example input: [ { "name": "The name of the organization.", "title": "The user's title within the organization. For example, member or engineer.", "primary": boolean to indicate if this is the primary org of the user, a user can have only one "type": "work", "description": "The description of the organization.", "department": "Specifies the department within the organization, such as sales or engineering." } ] |
Relations | A JSON list of the relationships of the user to other users. The maximum allowed data size for this field is 2Kb. Example input with detailed fields: [ { "value": "The name of the person the user is related to.", "type": "The type of relationship. If set to custom, customType must also be set. Acceptable values: admin_assistant, assistant, brother, child, custom, domestic_partner, dotted_line_manager, exec_assistant, father, friend, manager, mother, parent, partner, referred_by, relative, sister, spouse.", "customType": "If the relationship type is custom, this property contains the custom value and must be set." } ] |
Secondary Email | This is the email address where the new user receives their new account details. Also functions as the user's recovery email. |
Example Output
{
"addresses": "A list of the user's addresses. The maximum allowed data size for this field is 10Kb.",
"agreedToTerms": false,
"aliases": [
"string"
],
"archived": false,
"changePasswordAtNextLogin": false,
"creationTime": "User's G Suite account creation time. (Read-only)",
"customSchemas": {},
"customerId": "Output only. The customer ID to [retrieve all account users](/admin-sdk/directory/v1/guides/manage-users.html#get_all_users). You can use the alias `my_customer` to represent your account's `customerId`. As a reseller administrator, you can use the resold customer account's `customerId`. To get a `customerId`, use the account's primary domain in the `domain` parameter of a [users.list](/admin-sdk/directory/v1/reference/users/list) request.",
"deletionTime": "date-time",
"emails": "A list of the user's email addresses. The maximum allowed data size for this field is 10Kb.",
"etag": "Output only. ETag of the resource.",
"externalIds": "A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2Kb.",
"gender": "The user's gender. The maximum allowed data size for this field is 1Kb.",
"hashFunction": "Stores the hash format of the password property. We recommend sending the `password` property value as a base 16 bit hexadecimal-encoded hash value. Set the `hashFunction` values as either the [SHA-1](https://wikipedia.org/wiki/SHA-1), [MD5](https://wikipedia.org/wiki/MD5), or [crypt](https://en.wikipedia.org/wiki/Crypt_\\(C\\)) hash format.",
"id": "The unique ID for the user. A user `id` can be used as a user request URI's `userKey`.",
"ims": "The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size for this field is 2Kb.",
"includeInGlobalAddressList": false,
"ipWhitelisted": false,
"isAdmin": false,
"isDelegatedAdmin": false,
"isEnforcedIn2Sv": false,
"isEnrolledIn2Sv": false,
"isMailboxSetup": false,
"keywords": "The user's keywords. The maximum allowed data size for this field is 1Kb.",
"kind": "admin#directory#user",
"languages": "The user's languages. The maximum allowed data size for this field is 1Kb.",
"lastLoginTime": "User's last login time. (Read-only)",
"locations": "The user's locations. The maximum allowed data size for this field is 10Kb.",
"name": {
"familyName": "The user's last name. Required when creating a user account.",
"fullName": "The user's full name formed by concatenating the first and last name values.",
"givenName": "The user's first name. Required when creating a user account."
},
"nonEditableAliases": [
"string"
],
"notes": "Notes for the user.",
"orgUnitPath": "The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (`/`).",
"organizations": "A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb.",
"password": "User's password",
"phones": "A list of the user's phone numbers. The maximum allowed data size for this field is 1Kb.",
"posixAccounts": "A list of [POSIX](https://www.opengroup.org/austin/papers/posix_faq.html) account information for the user.",
"primaryEmail": "The user's primary email address. This property is required in a request to create a user account. The `primaryEmail` must be unique and cannot be an alias of another user.",
"recoveryEmail": "Recovery email of the user.",
"recoveryPhone": "Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: *+16506661212*.",
"relations": "A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.",
"sshPublicKeys": "A list of SSH public keys.",
"suspended": false,
"suspensionReason": "Output only. Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the `suspended` property is `true`.",
"thumbnailPhotoEtag": "Output only. ETag of the user's photo (Read-only)",
"thumbnailPhotoUrl": "Output only. Photo Url of the user (Read-only)",
"websites": "The user's websites. The maximum allowed data size for this field is 2Kb."
}
Workflow Library Example
Create Temporary User with Google Workspace
Preview this Workflow on desktop