XIA Automation Tutorial

Automatically Bulk Create User Accounts in Active Directory

This tutorial describes how to create user accounts in Active Directory using XIA Automation.

Tutorial Outcomes

Learn how to use XIA Automation to:

  • Green tick Create user accounts in Microsoft Active Directory on-premises
  • Green tick Generate unique usernames that meet your organization's policy
  • Green tick Generate passwords that meet your organization's policy

View the CSV import tutorial to learn how to create thousands of users at once.

1. Create the Automation Profile

Create a new Automation Profile in the XIA Automation Administration Tools. Set the Permissions as required.

Screenshot of a new automation profile in XIA Automation
Create a new automation profile

2. Create the Variable Definitions

Add the Variables you need to create users in AD such as FirstName, Surname, SamAccountName, UserPrincipalName and Password.

Screenshot of variable definitions in XIA Automation
Create the variables you need

3. Hide the generated Variable Definitions

The SamAccountName, UserPrincipalName and Password variables will be generated by XIA Automation so they can be set to Hidden. This hides them from the end user when the profile is executed via form input in the XIA Automation Server web interface.

Screenshot of variable access settings in XIA Automation
Hide the appropriate variables from the end user

4. Configure the Account Name Generator Task

To generate unique account names in your Active Directory, create a new Active Directory Account Name Generator Task:

Screenshot of the Active Directory Account Name Generator Task in the New Automation Task right click context menu

Assign the SAM and UPN Account Name Variables and add an Account Name Template that meets your organization's policy. The <n> token can be used to generate a unique account name when a name already exists in the domain by appending numeric values.

Screenshot of an Active Directory account name generator task in XIA Automation
Use a task to generate a unique username

You may wish to use a Variable Copy Task and a String Variable Substring Task to ensure the account name does not exceed the maximum length permitted in Active Directory.

5. Configure the Password Generation Task

To generate a password that meets your organization's policy, create a new Password Generation Task:

Screenshot of the Password Generation Task in the New Automation Task right click context menu

Assign the Password variable as the Output Variable and specify the settings as required.

Screenshot of a password generation task in XIA Automation
Use a task to generate a password

6. Configure the Account Creation Task

Create a new Active Directory Account Creation Task:

Screenshot of the Active Directory Account Creation Task in the New Automation Task right click context menu

Configure the LDAP path in which to create the user:

Screenshot of Active Directory user account creation task object settings in XIA Automation
Configure where to create the user

Configure the other task settings as required and assign the variables to the appropriate fields.

Screenshot of an Active Directory user account creation task in XIA Automation
Assign your variables to the appropriate fields in the task settings

If your domain has multiple DCs, you can add an Active Directory Replication Task after your creation task.

Press Save Configuration before executing the automation profile.

7. Create an Active Directory User Account

Execute the Automation Profile to create an Active Directory user account, either manually via the form input in the XIA Automation Server web interface, or in bulk via CSV, or automatically via file import.

Screenshot of the form input in the XIA Automation Server web interface
Create Active Directory users via the web interface

Supported Platforms

Creating user accounts in Active Directory is supported on domains running the following versions of Windows:

  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2

For more information about Active Directory tasks, please view the administrator's guide.

Try XIA Automation for free