> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-file-manager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-file-manager/bulk-user-accounts-creation.md).

# Bulk User Accounts Creation

**Purpose**

This document outlines the process for creating multiple user accounts simultaneously, ideal for efficiently onboarding larger groups into your application.

**Prerequisites**

* Administrative permissions within the user management system of your application.
* A properly formatted CSV (Comma-Separated Values) file.

**Required Fields**

The CSV file must include the following columns with unique values for certain fields:

* **userId:** A unique identifier for each user.
* **role:** The role or permission level assigned to the user. See "Role Types" below for details.
* **email:** A unique and valid email address for each user.
* **password:** A password of at least eight characters.

**Role Types**

The system supports three core user roles:

* **user:** Standard user with basic access and permissions.
* **admin:** Administrative user with elevated privileges, including the ability to manage other users.
* **viewer:** Read-only user, able to view data but not make changes.

**Optional Fields**

* **firstName:** User's first name.
* **lastName:** User's last name.
* **companyName:** The company the user is associated with.
* **deptName:** The department the user belongs to.

**CSV File Format**

userId,role,firstName,lastName,email,password,companyName,deptName\
user,user,usrname,one,<user1@localhost.localdomain>,passwordxyz,company1,dept1\
adminuser,admin,usrname,two,<adminuser@localhost.localdomain>,passwordxyz,company2,dept2\
viewuser,viewer,usrname,three,<viewuser@localhost.localdomain>,passwordxyz,company3,dept3<br>

**Instructions**

1. **Create the CSV File:**
   * Use a spreadsheet program (e.g., Microsoft Excel, or Google Sheets) or a text editor.
   * Ensure the first line contains the header names as shown above.
   * Populate subsequent lines with user data, each line representing one user.
   * Make sure the 'userId' and 'email' fields contain unique values.
   * Adhere to the minimum password length of eight characters.
   * Save the file in CSV format.
2. **Import the CSV File:**
   * Access the designated user management section of your application.
   * Locate the "Upload" button on the “Users” page.
   * Follow the application's prompts to upload your CSV file.
3. **Validation:**
   * The system will check your CSV file for proper formatting and validity.
   * If errors are found, carefully review and correct the issues in your CSV file before re-uploading.
4. **Account Creation:**
   * Once the file is validated, the system will create user accounts as specified.
   * Welcome emails will be sent to all the users that are created.

**Security Considerations**

* **Strong Passwords:** Encourage users to change their initial passwords to more secure, unique ones upon their first login. Consider implementing password complexity requirements if possible.
