Create User
Admin creates user with preset password. User receives login link via email.
Purpose and Benefits
What is User Creation?
User creation allows administrators to directly create user accounts in cidaas with admin-set passwords. Unlike invitations, created users are immediately active and searchable in the system, making this ideal for automated provisioning and bulk imports.
Key Benefits
| Benefit | Description |
|---|---|
| Immediate Activation | User account is created and searchable immediately - no registration step required |
| Admin Control | Admin sets initial password, enabling automated provisioning and bulk imports |
| Backend Automation | Perfect for system-to-system integration and bulk user imports |
| Client login page | initiate_login_uri sends the user to your app login page to start OAuth2 with fresh state, nonce, and code_verifier (PKCE) |
| Email/SMS Templates | USER_CREATED and USER_CREATED_VERIFY; initiate_login_uri is the target for {{login_link}} in USER_CREATED |
| Instant Access | User can login immediately with provided credentials |
| Password Security | Option to force password change on first login (need_reset_password) for enhanced security |
When to Use User Creation
- Backend Automation: Import users from external systems (HR, CRM, etc.)
- Bulk Provisioning: Create multiple users programmatically
- Automated Onboarding: System-generated accounts for new employees
- Migration: Import existing user databases
- Admin-Managed Accounts: When admin needs to control initial passwords
Quick Comparison
| Aspect | Create User | Invite User |
|---|---|---|
| Password Set By | Admin (set in request) | User (during registration) |
| User Action Required | Login only | Registration + Login |
| User Status | Created immediately | Created only after registration |
| Use Case | Automated provisioning, bulk imports | Team onboarding, customer invitations |
| Searchable | Immediately searchable | Only after registration |
Prerequisites
Before creating users:
- Field Settings configured
- User Groups created (if needed)
- User Roles defined (if needed)
- App Settings configured
initiate_login_uriconfigured in app settings (recommended for OAuth2 compliance)
API path
Use POST /user-srv/users.
POST /users-srv/user/create/byadmin is deprecated. It still works for existing integrations, but new work should use /user-srv/users. The request body shapes differ (userIdentities / authentication / authorization_url_details vs the older userEntity / notify_user payload).
Notifications (notifyBy)
Welcome notification is controlled by authorization_url_details.notifyBy:
notifyBy | Behaviour |
|---|---|
| omitted / empty | User is created; no welcome notification |
email | Sends email welcome / verify notification |
sms | Sends SMS welcome notification |
When a notification is sent, prefer authorization_url_details.initiate_login_uri (request value or the app setting) for {{login_link}} in USER_CREATED. redirect_uri and response_type are still accepted for account-verification context but are not used to build the welcome login link on this API.
The deprecated byadmin API uses top-level notify_user (default true) and can return AUTH10002 when notification OAuth context is incomplete. That behaviour applies to byadmin, not to POST /user-srv/users.
Username normalization
When creating users with a custom username or username identifier (in username or userIds):
- Automatic lowercase normalization: The username is normalized to lowercase in backend storage.
- Case-insensitive lookup: Users can log in using any casing (e.g.
JaneDoeorjanedoe), and subsequent duplicate account creation attempts differing only in letter case are rejected.
User Creation Flow
The following sequence diagram illustrates the complete user creation process from creation to user login:
Flow Steps Explained
-
Admin Creates User
- Admin calls
POST /user-srv/userswithuserIdentities,authentication, andauthorization_url_details - API Reference: See Create User API for request examples
- Admin calls
-
User Account Created
- User account is created immediately with
sub(unique identifier) - User is immediately searchable in user search APIs
- Groups and roles are assigned during creation
- If
authentication.need_reset_password: true, password reset is configured for first login
- User account is created immediately with
-
Login Link Resolution (when
authorization_url_details.notifyByisemailorsms)- Initiate Login URI: Prefer
authorization_url_details.initiate_login_urifrom the request; otherwise the app's configuredinitiate_login_uriis used for{{login_link}}inUSER_CREATED. - Unverified Email Handling: If email notification is sent and
userIdentities.email_verifiedisfalse, theUSER_CREATED_VERIFYtemplate is selected ({{verify_link}}).
- Initiate Login URI: Prefer
-
Notification Sent
- Channel is
authorization_url_details.notifyBy(emailorsms) USER_CREATED(email withemail_verified: true, or SMS):{{login_link}}targetsinitiate_login_uri; includes passwordUSER_CREATED_VERIFY(email withemail_verified: false): includes{{verify_link}}for account verification- Template variables:
{{name}},{{login_link}}or{{verify_link}},{{password}},{{account_name}}
- Channel is
-
User Logs In
- User clicks login link (redirects to client login page from
initiate_login_uri) - Client generates OAuth2 parameters (state, code_verifier for PKCE) client-side
- User enters credentials and completes OAuth2 flow
- If
authentication.need_reset_password: true, user is forced to change password on first login
- User clicks login link (redirects to client login page from
Important Create User Fields
| Field | Required | Description | Example |
|---|---|---|---|
userIdentities.provider | Yes | Must be self | self |
userIdentities.email | Yes* | User email address | [email protected] |
userIdentities.mobile_number | Yes* | User mobile number | +491234567890 |
userIdentities.username | Yes* | Username | johndoe |
authentication.password | Conditional | User password (required unless generate_password: true) | SecurePass123! |
authentication.generate_password | No | Auto-generate password from password policy | true |
authentication.need_reset_password | No | Force password change on first login | true |
userIdentities.given_name | No | User's first name | John |
userIdentities.family_name | No | User's last name | Doe |
userStatus | No | User status | VERIFIED or PENDING |
userIdentities.email_verified | No | Email verification status | true |
groups | No | Groups and roles to assign | [{groupId: "CIDAAS_USERS", roles: ["USER"]}] |
authorization_url_details.client_id | Recommended when notifying | App client ID for notification / app fallbacks | uuid-here |
authorization_url_details.notifyBy | No | email or sms to send welcome notification; omit for no notification | email |
authorization_url_details.initiate_login_uri | Recommended when notifying | Client login page URL for {{login_link}} | https://yourapp.com/login |
Note: At least one identifier (email, mobile_number, or username) is required.
initiate_login_uri
Recommended when notifyBy is email or sms.
- Configure on the app in app settings, or pass
authorization_url_details.initiate_login_uriin the request. This lets the client generate OAuth2 parameters (state, code_verifier for PKCE) client-side after create. - Becomes
{{login_link}}inUSER_CREATED(verified email or SMS). - Required (request or app) for welcome/login communication links on
POST /user-srv/users. USER_CREATED_VERIFY(email_verified: false) uses{{verify_link}}.
Important Details
Required Permissions
- Scope:
cidaas:users_write - Roles (in
CIDAAS_ADMINS):ADMIN,SECONDARY_ADMIN,SUPER_ADMIN, orUSER_CREATOR
Field Validations
- At least one identifier must be provided:
email,mobile_number, orusername - Password must meet password policy requirements (unless
authentication.generate_password: true) - Email format must be valid (if provided)
- Mobile number format must be valid (if provided)
- Groups must exist and be allowed in app settings
- Custom fields must be configured in Field Settings
User Status
- User account is created immediately with status
VERIFIED(or as specified) - User is immediately searchable in user search APIs
- User can login immediately with provided credentials
Create User Notification Templates
When authorization_url_details.notifyBy is email or sms, cidaas sends a USER_CREATED or USER_CREATED_VERIFY notification.
Template Key: USER_CREATED
Used when:
- Email (
notifyBy: email) andemail_verifiedistrue - SMS (
notifyBy: sms)
Template Variables:
{{name}}- User's full name{{login_link}}- Login URL in the notification. Built frominitiate_login_urion the request or app.{{password}}- User's password{{account_name}}- Organization/tenant name{{user_name}}- Email or mobile number
Locale Support:
- Set via
Accept-LanguageHTTP header (e.g.,Accept-Language: de) - Templates are localized based on user's locale
Template Key: USER_CREATED_VERIFY
Used when notifyBy: email and email_verified is false.
Template Variables:
{{name}}- User's full name{{verify_link}}- Account verification URL{{password}}- User's password{{account_name}}- Organization/tenant name
What the User Receives
- Personalized email/SMS with their name
- Clickable login link (or verification link if email not verified)
- Password (if not auto-generated, password is included)
- Account/organization name
Webhooks and Facts
When users are created, fact events (webhooks) are sent:
Event Types
ACCOUNT_CREATED_WITH_CIDAAS_IDENTITY: User created with self provider (email/password)ACCOUNT_CREATED_WITH_SOCIAL_IDENTITY: User created with social providerACCOUNT_CIDAASIDENTITY_ADDED: Additional cidaas identity added (for subsequent identities)ACCOUNT_SOCIALIDENTITY_ADDED: Additional social identity added (for subsequent identities)
Fact Event Structure
- Object Type:
users - Object ID: The
sub(unique user identifier) - Webhook Attributes:
["provider", "requestId", "sub"] - Use Case: Track user creation events, monitor onboarding, integrate with external systems
The sub allows you to:
- Link webhook events to specific users
- Track which user triggered each event
- Monitor user lifecycle in external systems
Groups & Roles
Assigning Groups
- Assign Groups: Groups assigned during creation
- App Settings: Groups must be allowed in app settings (
operations_allowed_groups) - User Status: User account is immediately active and searchable
Required Roles
| Operation | Required Roles |
|---|---|
| Create User | admin, secondary_admin, user_create |
Field Configuration
System Fields
Stored in Identity object:
given_name,family_nameemail,mobile_numberusername
Custom Fields
Stored at account level:
- Business-specific attributes
- Must be configured in Field Settings
Related: Account Structure
Admin Dashboard: Create User
Required Roles: admin, secondary_admin or user_create
Create Admin User
- Navigate to Users > Create User
- Select Admin usertype
- Enter identifiers (email, mobile, or username)
- Set password (or generate automatically)
- Configure groups and roles
- Click Create User
Result: User receives email with login link and password.
Create Normal User
- Navigate to Users > Create User
- Select User usertype
- Select client app (redirect URL auto-filled)
- Enter identifiers
- Configure user info and groups
- Click Create User
Result: User receives email with login link and password.
Technical Integration
| Endpoint | Method | Description | Link |
|---|---|---|---|
| Create User | POST | Create a new user with admin-set password | POST /user-srv/users |
Related Topics
| Topic | Description | Link |
|---|---|---|
| Invite User | User sets password during registration | Invite User |
| Register User | Self-service registration | Register User |
| Update Account | Modify user profile | Update Account |
| User Groups | Access control | User Groups |
| Account Structure | User data model | Account Structure |
Please contact us directly on our support page or reach out to cidaas support at [email protected].