Skip to main content
Version: v5.2

IafUser

Use the IafUser API to create a new User account. It exposes only user creation; for other User operations such as get, update, or listing an organization's users, use IafPassSvc directly. To manage a UserGroup's members (list, invite, or remove users from a group), use IafUserGroup instead.

create

Creates a new User class object.

ParameterRequiredTypeDescription
userDataYesUserPass a User object that contains the properties you want to define the user.
ctxNoCtxctx - Context, such as namespaces and authentication token information.
Returns

Promise<User> - Resolves with the created User object

Examples
// Create a new user
const userData = {
_firstname: "First Name",
_lastname: "Last Name",
_email: "email@mailinator.com",
_password: "Test@123"
};

const user = await IafUser.create(userData, ctx);