Hello Experts! I'm creating AD accounts via a C# app. If a new account has identical first, middle and last name of an already existing account, it is not getting created. What is the solution to this problem? What exception I need to catch to override this
behavior?
Accounts can have the same information in just about any field except the samaccountname. What you may want to do is setup a function that checks for the existance of the samaccountname in the directory before the account gets created and if it does, return
to the page and allow the name to be changed. This is where you will see names listed as john.smith, john.smith1, john.smith23.
What I did on mine was add this bit of code on the server side but I also created an AJAX call in the input field for the account name. So if the name existed a popup would alert you.
gww
Contributor
2143 Points
458 Posts
Re: Identical First, Middle and Last Name in Active Directory
Feb 21, 2012 09:27 PM|LINK
Accounts can have the same information in just about any field except the samaccountname. What you may want to do is setup a function that checks for the existance of the samaccountname in the directory before the account gets created and if it does, return to the page and allow the name to be changed. This is where you will see names listed as john.smith, john.smith1, john.smith23.
What I did on mine was add this bit of code on the server side but I also created an AJAX call in the input field for the account name. So if the name existed a popup would alert you.