Upload users explained
  • 21 Jun 2024
  • 2 minutes to read

Upload users explained


Article summary

You can use Totara's Upload users functionality to add new users to your site, or to update existing users, including changing passwords and roles. It is not necessary to upload multiple users, as you can also use this method to add or update individual accounts. 

As this method is workload intensive, it is also recommended you consider other authentication methods.

Difference to HR import

The Upload users menu does not include the position, organisation, manager, or job assignment fields. Therefore the Upload users method is not suitable if your site includes these fields.

HR import uses users' ID numbers to identify records to update. If you have records that don't have an ID number then you can use the Upload users function to add data to this field, and then use HR import to add hierarchy data.

Creating a file

You will need to create a file for upload and this file needs to follow a few specific rules.

It is advised you use a spreadsheet program to create the file and save it as a CSV (comma delimited) file. This is because the file must not contain spaces and should use a comma (or other delimiter) only. You can open the file with a simple text editor to check it is correctly formatted before uploading it. 

Within the file, the first line should contain all the valid field names you wish to include (e.g. username,password,firstname,lastname,email,course1,group1,cohort1). The following lines in the file should contain the relevant user details for upload, (e.g. ajones,6789,Addison,Jones,a.jones@email.com,security1,nzoffice,newusers).

See Available fields for uploading a user for more information on the fields you can include in the CSV file.

It is advised that you create a test file with only one user's details (these can be dummy details if you want) before running a large upload, so that you can make sure the file has been constructed properly. This way it is easier to fix any issues before compiling a larger file. 

Formatting notes

You should avoid special characters, such as quotes and commas, as these may not translate well when uploaded. If you do need to use a comma then encode it as &#44 to prevent confusion. The script will decode these back to commas when the file is uploaded. 

If you are including Boolean fields then use 0 for false and 1 for true.

Some fields have a maximum number of characters that are allowed (notably institution should be at most 40 characters long). 

When entering dates (for example in custom profile fields) use the ISO standard format YYYY-MM-DD, e.g. 2014-06-19, which will then be properly localised in the interface.

Example

Below is an example you can use to test the uploading process. Notice that on the first line the column headings are in bold, this has been done to distinguish them from the user details underneath. You do not need to use bold formatting in your uploads. 

username,password,firstname,lastname,email,course1,group1,cohort1

ssmith,12345,Sam,Smith,s.smith@email.com,hr101,ukoffice,newusers
ajones,6789,Addison,Jones,a.jones@email.com,security1,nzoffice,newusers

Can't find what you're looking for? Contact us at documentation@totara.com. Alternatively, book a call to have a chat about your Totara platform with a dedicated Customer Success Manager.

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