jira.js
    Preparing search index...

    Function createUser

    • Creates a user. This resource is retained for legacy compatibility. As soon as a more suitable alternative is available this resource will be deprecated.

      Note: This API does not support Forge apps.

      If the user exists and has access to Jira, the operation returns a 201 status. If the user exists but does not have access to Jira & no new jira-products are requested, the operation returns a 400 status.

      Permissions required: Administer Jira global permission. The caller has to be an organization admin.

      Parameters

      • client: Client
      • parameters: { emailAddress: string; products: string[]; self?: string }
        • emailAddress: string

          The email address for the user.

        • products: string[]

          Products the new user has access to. Valid products are: jira-core, jira-servicedesk, jira-product-discovery, jira-software. To create a user without product access, set this field to be an empty array.

        • Optionalself?: string

          The URL of the user.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              accountId?: string;
              accountType?: "unknown"
              | string & {}
              | "atlassian"
              | "app"
              | "customer";
              active?: boolean;
              applicationRoles?: {
                  callback?: { [key: string]: unknown };
                  items?: {
                      defaultGroups?: string[];
                      defaultGroupsDetails?: {
                          groupId?: (...) | (...) | (...);
                          name?: (...) | (...);
                          self?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      defined?: boolean;
                      groupDetails?: {
                          groupId?: (...)
                          | (...)
                          | (...);
                          name?: (...) | (...);
                          self?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      groups?: string[];
                      hasUnlimitedSeats?: boolean;
                      key?: string;
                      name?: string;
                      numberOfSeats?: number;
                      platform?: boolean;
                      remainingSeats?: number;
                      selectedByDefault?: boolean;
                      userCount?: number;
                      userCountDescription?: string;
                      [key: string]: unknown;
                  }[];
                  "max-results"?: number;
                  pagingCallback?: { [key: string]: unknown };
                  size?: number;
                  [key: string]: unknown;
              };
              appType?: string;
              avatarUrls?: {
                  "16x16"?: string;
                  "24x24"?: string;
                  "32x32"?: string;
                  "48x48"?: string;
                  [key: string]: unknown;
              };
              displayName?: string;
              emailAddress?: string;
              expand?: string;
              groups?: {
                  callback?: { [key: string]: unknown };
                  items?: {
                      groupId?: string | null;
                      name?: string;
                      self?: string;
                      [key: string]: unknown;
                  }[];
                  "max-results"?: number;
                  pagingCallback?: { [key: string]: unknown };
                  size?: number;
                  [key: string]: unknown;
              };
              guest?: boolean;
              locale?: string;
              self?: string;
              timeZone?: string;
              [key: string]: unknown;
          },
      >