I was working on a System Center Orchestrator runbook implementation for new user name creation and I was asked to create common names that following the structure “Last Name, First Name”. This is often used in large companies where “Bob Smith” wouldn’t be as useful as “Smith, Bob”. I imported my typical new user automation and proceeded to match the requirements to the domain and new user provisioning process. Interestingly, when we created a new user, everything worked up to the creation of the new user through the runbook automation activity.
I was greeted with this error:
The parent path ” was not found.
Target site: LdapUser.CreateNew
at Microsoft.Accelerators.ActiveDirectoryCore.LdapUser.CreateNew(ISafeDirectoryFactory factory, DistinguishedName distinguishedName, String samAccountName)
at Microsoft.Accelerators.ActiveDirectoryCore.LdapDirectory.CreateNewUser(DistinguishedName distinguishedName, String samAccountName)
Execute(IActivityRequest request, IActivityResponse response)
I found that error rather interesting and proceeded to try every typical troubleshooting step, such as accounts, network access, domain controller, and PowerShell creation of the user. I then determined that the activity was improperly believing that when I created the account with the inserted comma, it was trying to insert that into the path itself. In order to allow the create user process to work properly I had to modify it to include quotations around my username.
Here is an example:
Hopefully this keeps others out of the same troubleshooting process when creating new users with commas in the common name. Have a great day and happy automating!