Available fields for uploading a user
  • 05 Jul 2023
  • 4 minutes to read

Available fields for uploading a user

Article Summary

The table below contains a list of available fields you can include in the file you use for uploading users 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 enabled.



Username can only contain alphabetical lowercase letters, numbers, hyphens (-), underscores (_), periods (.), or at signs (@).

Required field.


The user's first name.

Required field.


The user's last name.

Required field.


Email is in the following format: name@example.com

Required field.


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. 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.


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



Use a two-letter country code. 

See the ISO 3166 country codes database for details.


The auth field must be used if the site uses an alternative authentication method, 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.



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.


You must create the custom fields before importing the upload users file.


Used for changing of usernames.



Use this to delete a user with 1, or use 0 to add a user that has been deleted.



Use this to suspend a user, with to suspend and to unsuspend the user.



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:


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


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


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


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


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


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


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.



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.


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? 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.

© Copyright 2024 Totara Learning Solutions. All rights reserved. Some content originally obtained via GPLv3 license and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions. 

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.