Function: createUser()
function createUser(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
active?: boolean;
department?: string;
displayName?: string;
emails?: object[];
externalId?: string;
groups?: object[];
id?: string;
meta?: {
[key: string]: unknown;
created?: Date;
lastModified?: Date;
location?: string;
resourceType?: string & object | "USER" | "GROUP" | "DIRECTORY";
};
name?: {
[key: string]: unknown;
familyName?: string;
formatted?: string;
givenName?: string;
honorificPrefix?: string;
honorificSuffix?: string;
middleName?: string;
};
nickName?: string;
organization?: string;
phoneNumbers?: object[];
preferredLanguage?: string;
schemas?: string[];
timezone?: string;
title?: string;
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User?: {
[key: string]: unknown;
department?: string;
organization?: string;
};
urn:scim:schemas:extension:atlassian-external:1.0?: {
[key: string]: unknown;
atlassianAccountId?: string;
};
userName?: string;
}>;Defined in: src/userProvisioning/api/users.ts:157
Creates a user in the directory. Note: An attempt to create an existing user will fail with a 409 (Conflict) error.
Use this API to manage accounts outside your organization when assigning these users to SCIM groups.
If there's already a managed Atlassian account associated with the specified email address on the Atlassian platform, the user in your identity provider will be connected or linked to the user in your Atlassian organization.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { active?: boolean; attributes?: string; department?: string; directoryId: string; displayName?: string; emails?: object[]; excludedAttributes?: string; externalId?: string; groups?: object[]; id?: string; meta?: { created?: unknown; lastModified?: unknown; location?: string; resourceType?: string & object | "USER" | "GROUP" | "DIRECTORY"; }; name?: { familyName?: string; formatted?: string; givenName?: string; honorificPrefix?: string; honorificSuffix?: string; middleName?: string; }; nickName?: string; organization?: string; phoneNumbers?: object[]; preferredLanguage?: string; schemas?: string[]; timezone?: string; title?: string; urn:ietf:params:scim:schemas:extension:enterprise:2.0:User?: { department?: string; organization?: string; }; urn:scim:schemas:extension:atlassian-external:1.0?: { atlassianAccountId?: string; }; userName?: string; } | - |
parameters.active? | boolean | A boolean value indicating the user's administrative status. This value will default to true if not provided. |
parameters.attributes? | string | Resource attributes to be included in response. Mutually exclusive from excludedAttributes. Example: userName,emails.value |
parameters.department? | string | User's department. |
parameters.directoryId? | string | The SCIM base URL that is generated when conecting an identity provider with SCIM provisioning. |
parameters.displayName? | string | User's display name. |
parameters.emails? | object[] | Email addresses of the User. This is a required field during user creation or modification. One value must be marked as primary. |
parameters.excludedAttributes? | string | Resource attributes to be excluded from response. Mutually exclusive from attributes. Example: timezone,emails.type,department |
parameters.externalId? | string | Identifier defined by provisioning client. This is a case-sensitive field. Uniqueness is controlled by client. |
parameters.groups? | object[] | Groups to which the user is associated in SCIM. |
parameters.id? | string | Unique identifier defined by Atlassian SCIM Service. CaseExact. This is a read-only field and will be disregarded if included in the payload during user creation or modification.. |
parameters.meta? | { created?: unknown; lastModified?: unknown; location?: string; resourceType?: string & object | "USER" | "GROUP" | "DIRECTORY"; } | - |
parameters.meta.created? | unknown | The DateTime that the resource was added to Atlassian SCIM service. This is a read-only field. |
parameters.meta.lastModified? | unknown | The most recent DateTime that the details of this resource were updated. This is a read-only field. |
parameters.meta.location? | string | The URI of the resource being returned. This is a read-only field. |
parameters.meta.resourceType? | string & object | "USER" | "GROUP" | "DIRECTORY" | The name of the resource type of the resource. This is a read-only and case-sensitive field. |
parameters.name? | { familyName?: string; formatted?: string; givenName?: string; honorificPrefix?: string; honorificSuffix?: string; middleName?: string; } | - |
parameters.name.familyName? | string | The family name of the User. |
parameters.name.formatted? | string | The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
parameters.name.givenName? | string | The given name of the User. |
parameters.name.honorificPrefix? | string | The honorific prefix(es) of the User, or title in most Western languages. |
parameters.name.honorificSuffix? | string | The honorific suffix(es) of the User, or suffix in most Western languages. |
parameters.name.middleName? | string | The middle name(s) of the User. |
parameters.nickName? | string | User's nickname. |
parameters.organization? | string | User's organization. |
parameters.phoneNumbers? | object[] | Phone numbers of the user. |
parameters.preferredLanguage? | string | User's preferred language. |
parameters.schemas? | string[] | SCIM schemas that define the attributes present in the current JSON structure This is a required field during user creation or modification. |
parameters.timezone? | string | User's timezone. e.g. America/Los_Angeles . |
parameters.title? | string | User's title. |
parameters.urn:ietf:params:scim:schemas:extension:enterprise:2.0:User? | { department?: string; organization?: string; } | - |
parameters.urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.department? | string | Department the user belongs to. |
parameters.urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.organization? | string | Organization the user belongs to. |
parameters.urn:scim:schemas:extension:atlassian-external:1.0? | { atlassianAccountId?: string; } | - |
parameters.urn:scim:schemas:extension:atlassian-external:1.0.atlassianAccountId? | string | - |
parameters.userName? | string | Unique identifier defined by the provisioning client. Atlassian SCIM service will verify the value and guarantee its uniqueness. This is a required field during user creation or modification. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; active?: boolean; department?: string; displayName?: string; emails?: object[]; externalId?: string; groups?: object[]; id?: string; meta?: { [key: string]: unknown; created?: Date; lastModified?: Date; location?: string; resourceType?: string & object | "USER" | "GROUP" | "DIRECTORY"; }; name?: { [key: string]: unknown; familyName?: string; formatted?: string; givenName?: string; honorificPrefix?: string; honorificSuffix?: string; middleName?: string; }; nickName?: string; organization?: string; phoneNumbers?: object[]; preferredLanguage?: string; schemas?: string[]; timezone?: string; title?: string; urn:ietf:params:scim:schemas:extension:enterprise:2.0:User?: { [key: string]: unknown; department?: string; organization?: string; }; urn:scim:schemas:extension:atlassian-external:1.0?: { [key: string]: unknown; atlassianAccountId?: string; }; userName?: string; }>