AJAX connector from web to Activedirectory

We have few web based forms and we need to run a AJAX connector on local active directory to validate if the users alias/email address exists and have a Green symbol if exists or RED color symbol if it doesnt exists.
This will help us to validate from client end and save user time.
Can you please let me know if this is possible.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I haven't dealt with making an A/D call directly using AJAX, but you can certainly query A/D using your server-side language and return the result as json. Your AJAX connector would then just interact with the returned json object.

If you have a good relationship with your database team, you could request a special table that's populated by A/D and kept fresh using a scheduled job. One benefit to this approach is that it can be used on your intranet and public facing site without worrying about making calls to A/D. The caveat is that the DBAs would have to establish a linked server connection to A/D in order to keep your table populated.
o365AdmAuthor Commented:
Hi Lajuan,

we dont maintain a database for storing objects as the number of users are comparitively less. Howver we could store the user alias/SMTP in a csv/txt file. Is it possible to query ajax from web to the local csv.

Could you also share a sample code for the same.

Thank you so much.
@o365Adm - What server-side language are you using PHP, .NET, ColdFusion?

Do you have an automated way to keep the .csv/.txt file updated?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

o365AdmAuthor Commented:
Hi Lajuan,

We use ASP with powershell. Yes we have an automated process to update the csv file.
@o365Adm - Okay, one more thing. What A/D objects will your .csv file contain?

I don't need any data. Just the .csv file layout.
o365AdmAuthor Commented:
Sample format.
@o365Adm - Just to confirm... You want a sample using classic ASP versus ASP.NET. Is that correct?
o365AdmAuthor Commented:
Correct. We are using classic ASP.
@o365Adm - Attached a zip file containing two possible solutions. You will have to remove the .txt from the asp and js files.

The JavaScript solution requires that you separate the A/D accounts into text files from a-z based on the first letter for each alias or search term.

The ASP option still requires that you pull the csv data into the getdata.asp file.

I think a better option might be to use XML or JSON as opposed to the csv. I didn't have time to test, but I know there's a current project that supports use of JSON with ASP:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
o365AdmAuthor Commented:
Hi Lajuan,

Thank you . We have possibility to export data to JSON. I will try your solution.
Again thank you so much for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.