Link to home
Create AccountLog in
Avatar of Byteridge

asked on

Take Information from active directory dynamically and show it in a list

I want to make a list where i can get some information from active directories and make them read only information.User is not allowed to change that information .Secondly i want to take some information from user information list and display it in the same list but this information is editable.The information from active directory comes dynamically means when user access this list it information come from AD.
Avatar of jlindler

Would a connection in MS Access work?  If so, you can create a passthrough query like this:

select convert(varchar(50), [Name]) as FullName,
convert(varchar(50), sAMAccountName ) as LogonName,
distinguishedName as DN,

from openquery(ADSI,'select Name, sAMAccountName,  distinguishedName, TelephoneNumber, mail, department
WHERE objectCategory = ''Person''
AND objectClass = ''user''')
Oops.... Missed the part about editable.   The method above will only give you a read only list.   (It also works with SQL by the way).

I noticed this in the web servers section....   Are you attempting to do this on a web form?  
Avatar of pr0t0c0l12

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Byteridge


Hii jlinder,

I didn't get what u said.I am a newbie to sharepoint so please explain it.
and i am not using MS-ACCESS in my project anywhere.
I was not sure exactly what you were looking for....   If are looking for an easy way to query AD information, the query above will work...  However, you are looking for more than that.   The information from pr0t0c0l12 is probably more like what you are looking for!
Hii jlinder

Here is the working scrnario.I have created a list in a site and i am display some information like Username,Email address,Hobbies,Department etc.Now i want that information like username and email address come directly from AD and user can only view them not edit.and he can edit information like hobbies and dept.

There is one more question in my mind that is IS it possible in wss to get information from active directories and display them in a list dynamically.
In simple words

Can user update information in active directories from site or vice versa in WSS 3.0.??
Need to edit the script after that also.