Import multiple users at once using a CSV file. This is the fastest way to onboard a large team, a new department, or an entire organization into SecureAI.
Prepare Your CSV File
Create a CSV file with one row per user. The file must include a header row with the following columns:
| Column | Required | Description | Example |
|---|---|---|---|
email |
Yes | User's email address | jsmith@example.com |
name |
Yes | Display name | Jane Smith |
role |
No | user or admin (defaults to user) |
user |
department |
No | Department name for organization | Parts Counter |
Example CSV
email,name,role,department
jsmith@example.com,Jane Smith,admin,IT
bwilson@example.com,Bob Wilson,user,Parts Counter
mgarcia@example.com,Maria Garcia,user,Service Desk
tlee@example.com,Tom Lee,user,Warehouse
Formatting Rules
- Encoding: Save the file as UTF-8. Spreadsheet applications like Excel may default to a different encoding — use "Save As" and select CSV UTF-8.
- Email addresses: Must be valid and unique. Duplicate emails will cause that row to fail.
- Roles: Only
userandadminare accepted. Any other value will cause that row to fail. If the column is omitted or left blank, the user is assigned theuserrole. - No extra columns: Unrecognized columns are ignored, but keep your file clean to avoid confusion.
- Maximum rows: Up to 500 users per import. For larger imports, split the file and run multiple imports.
Run the Import
- Navigate to Admin Panel > Users.
- Click Import Users (top right).
- Click Choose File and select your CSV.
- Review the preview table. SecureAI validates the file and shows:
- Total rows detected
- Rows that will be imported successfully
- Rows with errors (highlighted in red with the reason)
- Click Import to proceed with the valid rows.
Rows with errors are skipped — they do not block the rest of the import.
After Import
Each imported user receives an invitation email with a link to set their password. The email is sent to the address in the CSV.
- Invitation expiry: Links expire after 72 hours. Users who do not activate in time can be re-invited from the user management screen.
- SSO users: If your organization uses SSO, imported users can sign in with their SSO credentials immediately. No invitation email is needed — they authenticate through your identity provider on first login.
Role Assignment During Import
Use the role column to assign roles at import time instead of updating each user individually afterward.
- Omit the
rolecolumn or leave it blank to assign all users the defaultuserrole. - Set
adminonly for users who need access to the Admin Panel (user management, analytics, model configuration). - Roles can be changed later from Admin Panel > Users > [User] > Role.
Error Handling
Common Import Errors
| Error | Cause | Fix |
|---|---|---|
duplicate_email |
Email already exists in the system | Remove the row or update the existing user instead |
invalid_email |
Email format is invalid | Check for typos, missing @, or extra spaces |
invalid_role |
Role value is not user or admin |
Correct the role value or leave blank for default |
missing_required_field |
email or name column is empty |
Fill in the required value |
encoding_error |
File is not UTF-8 | Re-save the CSV as UTF-8 |
Partial Imports
If some rows fail, SecureAI imports the valid rows and skips the rest. After the import completes, you can:
- Download the error report — a CSV listing the failed rows with error reasons.
- Fix the errors in the failed rows.
- Re-import only the corrected rows.
You do not need to re-import the entire file. Users already imported successfully will not be duplicated.
Bulk Import via API
For automated onboarding (HR system integration, scripts), use the SecureAI Admin API.
curl -X POST https://your-instance.secureai.example/api/admin/users/import \
-H "Authorization: Bearer $ADMIN_API_TOKEN" \
-H "Content-Type: multipart/form-data" \
-F "file=@users.csv"
The API response includes a summary of imported and failed rows:
{
"imported": 48,
"failed": 2,
"errors": [
{"row": 12, "email": "bad-email", "reason": "invalid_email"},
{"row": 37, "email": "existing@example.com", "reason": "duplicate_email"}
]
}
Use the same CSV format described above. The API enforces the same validation rules as the UI import.
Troubleshooting
| Problem | Solution |
|---|---|
| Import button is grayed out | You need the admin role to import users |
| No invitation emails received | Check your email delivery settings in Admin Panel > Settings > Email. Verify the SMTP configuration is correct. |
| CSV appears garbled in preview | Re-save the file as UTF-8. Excel's default CSV format uses Windows-1252 encoding. |
| Import completes but user count seems wrong | Check the error report for skipped rows. Duplicate emails are silently skipped. |
Next Steps
- User Management — manage individual users, roles, and deactivation.
- If your organization uses SSO, see Configuring SAML SSO or Configure OIDC SSO so imported users can authenticate through your identity provider.