Create User
Description
Creates a new AttackForge user. This is a write operation: it persists a new user record, grants it a role, and emails the new user a welcome message.
The shape of args is declared inline (see Building args for Write Tools), so no preparatory call is needed. Only username and email are required; every other key has a default.
Preconditions: the caller must be an administrator, the username and email address must not already be in use, and the tenant must be within its user licence for any role other than client. On success the new user id is returned.
How To Enable
Go to
UsersSelect the user you would like to provide access to this tool
Click on
Access > MCPClick on
Add ToolsSelect the tool
create_userand clickAdd
Example Prompts
Create a consultant account for Jane Smith, jane.smith@example.com.
Add a client user for the ACME engagement and make them change their password on first login.
Create a new admin user called ops.admin.
Set up a user for Bob and put "Security" in the department custom field.
Parameters
args
object
Yes
The user-creation payload - see the keys below.
args keys:
username
string
Yes
The username the new user signs in with. Must not already be in use by another user.
email
string
Yes
Email address of the new user. Must not already be in use by another user. The welcome email is sent to this address.
first_name
string
No
First name. Defaults to New when omitted.
last_name
string
No
Last name. Defaults to User when omitted.
role
string
No
One of 'admin', 'projectoperator', 'librarymod', 'consultant', 'client'. Defaults to 'client'. Every role other than 'client' consumes a user licence, so creating one fails once the licence is exhausted.
password
string
No
Initial password, 15 to 70 characters. It is never returned by this or any other tool, so a password set here has to reach the user by some other means. When omitted a random password is generated instead - the recommended option - and the user sets their own through the forgotten-password flow.
force_password_change
boolean
No
Require the user to change their password the first time they sign in. Defaults to false.
mfa_enabled
boolean
No
Require multi-factor authentication for the new user. Defaults to true.
custom_fields
array
No
Custom field values, each { key, value }. Discover keys via get_field_structure(model="user").
Example Response
Last updated