--- title: "Available fields for uploading a user" slug: "available-fields-for-uploading-a-user" tags: ["Reference", "Site Administrator"] updated: 2026-05-11T12:41:39Z published: 2026-05-11T12:41:39Z canonical: "totara.help/available-fields-for-uploading-a-user" --- > ## Documentation Index > Fetch the complete documentation index at: https://totara.help/llms.txt > Use this file to discover all available pages before exploring further. # Available fields for uploading a user The table below contains a list of available fields you can include in the file you use for [uploading users](/19/docs/upload-a-user) to your site. The required fields are noted in the notes column and all other fields are optional, so you can use as many or as few of them as you wish. The default values for many user profile fields can be set on the **Upload users preview** screen. You can bulk upload users to a specific tenant using the **Tenant** default value if you have [multitenancy](/19/docs/what-is-multitenancy) enabled. | **Field** | **Description** | **Notes** | | --- | --- | --- | | username | Username can only contain alphabetical lowercase letters, numbers, hyphens (-), underscores (_), periods (.), or at signs (@). | Required field. | | firstname | The user's first name. | Required field. | | lastname | The user's last name. | Required field. | | email | Email is in the following format: name@example.com | Required field. | | password | The password field is optional when the **Create password if needed** setting is chosen (default). - If included, values should meet the requirements for the site's [Password policy](/19/docs/security-overview). To force password change for a particular user, set the password field to **changeme**. - If omitted, a password will be generated for each user (during the next cron job) and welcome emails sent out. Note that this only works when adding new users. | Note that if the password field is empty and new passwords are created then users will be notified by email. This could result in a very large number of emails being sent if you have a lot of users. | | maildigest | To prevent users from receiving a large number of emails from your site, use the **maildigest** field. The options for this field are: - 0 = No digest - 1 = Complete digest - 2 = Digest with just subjects | - | | maildisplay | Sets the email display option for a user. The options for this field are: - 0 = Hide my email address from non-privileged users - 1 = Allow everyone to see my email address - 2 = Allow only other course members to see my email address | - | | country | Use a two-letter country code. | See the [ISO 3166 country codes database](https://www.iso.org/obp/ui/#search) for details. | | auth | The **auth** field must be used if the site uses an alternative [authentication method](/19/docs/available-authentication-methods)[](https://help.totaralearning.com/display/THM/.Authentication+v14), such as LDAP, as otherwise the authentication method will default to manual and users using a different authentication method won't be able to log in. | - | | profile_field_xxxxx | If you have custom profile fields, you can optionally include these in the upload file by entering them in the format **profile_field_xxxxx**, where the custom profile field name is **xxxxx** (i.e. the unique shortname). Ensure that you use all lowercase for the shortname. For example, if you have a custom field for **department** then it would be entered in the file as **asprofile_field_department**. If your custom field is a menu then ensure that you use one of the corresponding options in the user detail record entry. For example, the custom field **department** might have three options: **HR**, **Marketing** or **Training**. You would therefore just enter one of these into the value for the user details. **username,firstname,lastname,email,profile_field_department** bbarker,Bailey,Barker,b.barker@email.com,HR skellen,Spencer,Kellen,s.kellen@email.com,Marketing Custom fields which are **Checkboxes** require you to either enter **1** (indicating checkbox selected) or **0** (checkbox deselected). For example you have a custom field checkbox **Check the box if you a****re you operational crew** which has the unique shortname **opcrew.** You would then enter in the value of **1** for the user if they are operational crew or **0** if they are not. **username,firstname,lastname,email,profile_field_opcrew** mpacker,Marley,Packer,mpacker@email.com, 1 byoungs,Ben,Youngs,byoungs@email.com, 0 | You must create the custom fields before importing the upload users file. If the profile field type is **Date or Time format** then the data in the field needs to either be a timestamp (unix), or for a date in the format given by the **csvdateformat** e.g. **dd/mm/yyyy** You can check the **csvdateformat** config setting under *Quick-access menu >* *Localisation > Location settings > CSV import date format.* | | oldusername | Used for changing of usernames. | - | | deleted | Use this to delete a user with **1**, or use **0** to add a user that has been deleted. | - | | suspended | Use this to suspend a user, with **1** to suspend and **0** to unsuspend the user. | - | | course | If you have Totara Learn, you can enter multiple courses using the header 'course' and a number, e.g. **course1**,**course2**, etc. The other enrolment fields then need to use the same numerical suffix. The course field uses the course shortname as the value in the user details entry. For example: **username,firstname,lastname,email,course1,group1,course2,role2** bbarker,Bailey,Barker,b.barker@email.com,hr101,ukoffice,security1,learner The example above would add the user Bailey Barker as follows: - To the course shortname HR101 as a member of the UK office group in a Trainer role - To the course shortname security1 in a Learner role | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | group | If you have Totara Learn, you can assign users to groups in a course using the group name or ID (numeric group names are not supported). | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | type | For Totara Learn, **type** sets the role to be used for the enrolment. You can use the following values: - 1 for default course role - 2 for legacy Trainer role - 3 for legacy Non-editing Trainer | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | role | When using Totara Learn, you can add a role in two ways: - Role shortname (numeric names of roles are not supported) - Role ID | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | enrolperiod | For Totara Learn, you can use the enrol period to set the enrolment duration, in days, for each course. | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | enrolstatus | With Totara Learn, the **enrolstatus** can suspend users from a course when set to **1**, or left blank for enrolled. | Enrolment fields should use matching suffixes, e.g. course1,group1,role1,course2,group2 | | cohort | You can use the **cohort** field to add audiences. This optional field uses the format: **cohort1**. Internal audience ID numbers or non-numeric audience IDs of existing audiences must be used. Names are not allowed. | - | | mnethostid | Existing MNetusers can be added to courses, groups, or audiences as below: - Enrolling to courses: username+mnethostid+course required (Totara Learn) - Adding to groups: username+mnethostid+course+group required (Totara Learn) - Adding to cohorts/audiences: username+mnethostid+cohort required - Suspending/reactivating accounts: username+mnethostid+suspended required All other operations are ignored. You cannot add users, delete them or update them (such as change names or email, profile fields, etc.). | This field is optional. | | sysrole | System role is an optional field that uses the format: **sysrole1,sysrole2,sysrole3** etc. Users may be uploaded to a system role (usually Manager) by entering the shortname of that role. Other roles can only be uploaded if they have already been assigned in the system context. Find more information on the [What are roles?](/19/docs/what-are-roles) page. Multiple roles can be assigned using **sysrole2**, **sysrole3**, etc. fields. Note that the number suffix in no way relates to the number suffixes on the enrolment fields. The numbers must go up in sequence, starting at 1. | Users can also be removed from a given system role by entering the shortname of that role prefixed with a minus symbol: '-'. If the user is currently assigned to that role, they are removed from it. If the user is not currently assigned to that system role, the field value is ignored. However, the field value must refer to a system role that does exist on the system, otherwise an error will occur. | | Optional fields | You can also enter other fields as listed below: - institution - department - city - lang - timezone - idnumber - icq - phone1 - phone2 - address - url - description - mailformat - htmleditor - autosubscribe | If you are using the optional **idnumber** field then Totara will check for duplicates. | Join the [Totara Community](https://totara.community/) for more resources to help you get the most out of Totara. © Copyright 2025 Totara Learning Solutions. All rights reserved. Some content originally obtained via [GPLv3 license](https://www.gnu.org/licenses/licenses.html#GPL) and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions.