Skip to content

Function: patchUser() ​

ts
function patchUser(
   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:101

Updates a user's information in the directory based on their userId via PATCH. Refer to Service Provider Configuration APIs for details on supported operations.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ attributes?: string; directoryId: string; excludedAttributes?: string; operations?: object[]; schemas?: string[]; userId: string; }-
parameters.attributes?stringResource attributes to be included in the response. Mutually exclusive from excludedAttributes. Example: userName,emails.value
parameters.directoryId?stringThe SCIM base URL that is generated when conecting an identity provider with SCIM provisioning.
parameters.excludedAttributes?stringResource attributes to be included in the response. Mutually exclusive from attributes. Example: timezone,emails.type,department
parameters.operations?object[]SCIM patch operations.
parameters.schemas?string[]SCIM patch schemas.
parameters.userId?stringUnique ID to identiy the users. Use the Get users API to get the userId.
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; }>