Skip to content

Function: replaceUser() ​

ts
function replaceUser(
   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:32

Update the directory-based user information using the user attributes associated with their userId. User information is replaced attribute-by-attribute, with the exception of immutable and read-only attributes. Existing values of unspecified attributes are cleaned.

Parameters ​

ParameterTypeDescription
clientClient-
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; }; userId: string; userName?: string; }-
parameters.active?booleanA boolean value indicating the user's administrative status. This value will default to true if not provided.
parameters.attributes?stringResource attributes to be included in the response. Mutually exclusive from excludedAttributes. Example: userName,emails.value
parameters.department?stringUser's department.
parameters.directoryId?stringThe SCIM base URL that is generated when conecting an identity provider with SCIM provisioning.
parameters.displayName?stringUser'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?stringResource attributes to be excluded in the response. Mutually exclusive from attributes. Example: timezone,emails.type,department
parameters.externalId?stringIdentifier 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?stringUnique 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?unknownThe DateTime that the resource was added to Atlassian SCIM service. This is a read-only field.
parameters.meta.lastModified?unknownThe most recent DateTime that the details of this resource were updated. This is a read-only field.
parameters.meta.location?stringThe 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?stringThe family name of the User.
parameters.name.formatted?stringThe full name, including all middle names, titles, and suffixes as appropriate, formatted for display.
parameters.name.givenName?stringThe given name of the User.
parameters.name.honorificPrefix?stringThe honorific prefix(es) of the User, or title in most Western languages.
parameters.name.honorificSuffix?stringThe honorific suffix(es) of the User, or suffix in most Western languages.
parameters.name.middleName?stringThe middle name(s) of the User.
parameters.nickName?stringUser's nickname.
parameters.organization?stringUser's organization.
parameters.phoneNumbers?object[]Phone numbers of the user.
parameters.preferredLanguage?stringUser'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?stringUser's timezone. e.g. America/Los_Angeles .
parameters.title?stringUser'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?stringDepartment the user belongs to.
parameters.urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.organization?stringOrganization 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.userId?stringUnique ID to identiy the users. Use the Get users API to get the userId.
parameters.userName?stringUnique 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; }>