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