Import Users into Active Directory from CSV

In this guide, you will learn how to import users into Active Directory from a CSV file using the AD Pro Toolkit. With the Toolkit all you need to do is download the included csv template and fill out the requires fields to easily create new accounts.

Table of Contents

How to Import Active Directory Users from CSV

Step 1. Download CSV Template

From the left menu click on “Create Bulk Users”.

Click on “Download CSV Template”.

  • This CSV includes an example of two user accounts.
  • The CSV template includes 33 user attributes. This covers the most common attributes for creating new accounts.
  • Additional attributes can be added to the template (see the section Add Additional Attributes for details)

Step 2. Modify the CSV Template with User details

Open the CSV template and enter the account details. The below columns are required; all other fields are optional. You can delete the columns you don’t need.

  1. SamAccountName = This will be the users logon name.
  2. password = users password. Make sure it meets your password requirements.
  3. givenName = First name
  4. sn = Last name

CSV Example

Tips

  1. Remove unused columns: You can remove any column from the CSV you don’t need. This can make working with the CSV template much easier. Just make sure you have the 4 required columns listed above; all other columns can be removed.
  2. CSV Cheat Sheet: Use the CSV Cheat Sheet from the resources section if you do not understand the column names in the csv template.
  3. Run a small test import: Run a small test import first (1-2 accounts) to ensure the CSV is correct and the accounts import as needed.

Step 3. Run the Bulk Create Users Tool

At this point you should have a csv file filled out with your user details. Now you are ready to start the import process.

  1. Click on “Bulk Create Users”.
  2. Click “Browse” and select your csv file.
  3. Enable or disable any of the following options.



    • Enable: This will enable or disable the account when it is created (enabled by default)
    • User must change password at next logon: This option will require users to change their password at first logon.
    • Name format
      • FirstName LastName: Sets the name format to FirstName + LastName
      • LastName, FirstName: Sets the name format to LastName, + FirstName
      • Same as user logon name: Sets the name format to logon name (samaccountname)

  4. Click “run” to start the import.

Supported Attributes

The csv file uses the LDAP name which can be different than the fields you see in Active Directory users and computers.

For example, in the csv to set the users First name you would enter that in the givenName column. Below are some screenshots that show the ldap to Active Directory names.

General Tab

Address Tab

Account Tab

Profile Tab

Telephones Tab

Organization Tab

LDAP NameActive Directory FieldDescription
sAMAccountNameUser logon name (pre-windows 2000)This will be the users logon name
passwordN/AThe users password
ouN/AThe organizational unit you want the account created in.
memberofThe groups you want the user added to.
userPrincipalNameUser logon nameThe user logon name under the account tab.
givenNameFirst nameThe users first name
initialsinitialsThe users initials
snLast nameThe users last name
displaynameDisplay nameThe users display name
descriptiondescriptionThe description field on the general tab
physicalDeliveryOfficeNameOfficeThe office field on the general tab
telephoneNumberTelephone numberThe Telephone number on the general tab
mailE-mailE-mail on the general tab
wwwHomepageWeb pageWeb page on the general tab
streetAddressStreetThe users Street field on the Address tab.
postOfficeBoxP.O BoxUsers P.O Box on the address tab
lCity
stState/province
postalCodeZip/Postal Code
cCountry
profilePathProfile path
scriptPathLogon script
homeDirectoryHome folder > local path
homePhoneHome
mobileMobile
ipPhoneIP phone
titleJob Title
departmentDepartment
companyCompany
employeeidN/A
employeenumberN/A
managerManager
proxyAddressesN/A

Add Additional Attributes to the CSV

You can add additional user attributes to the CSV file; you just need to know the LDAP name. You can find the LDAP name by opening the attribute editor in Active Directory Users and Computers. You could also use PowerShell to list all user account properties.

To see the attribute editor, you first need to enable the advanced features in Active Directory Users and Computer

Click view from the top menu then select advanced features.

Now when you open an account you will see the attribute editor tab.

The attribute editor screen will show you all the user LDAP properties.

Now just find the attribute name and add it to the CSV. For example, I want to add information to the other Home telephone section for users.

In the attribute editor, I see the name is “otherHomePhone”. I will add this to the CSV.

All done. That is how you add additional attributes to the CSV file to import with new accounts.