Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

ADSI syntax

  Asked By: Lukas    Date: Nov 08    Category: Sharepoint    Views: 1081

I am writing a Web Part that will iterate through all the users that have permission to a site, and display certain information about them, such as name, e-mail, public view of MySite (link), etc… The problem I am running into is that a Security Group is considered a ‘user’. I need to query AD to iterate through the group to return certain member attributes, as mentioned above. Has anyone done this before, and if so, would you mind sharing it with me?

From what I have gathered so far, an ADSI connection has to be made to Active Directory to get the group ‘object’, then using an LDAP query, retrieve the list of members, specifying which attributes to return. The theory part is the easiest – need some help with the syntax/procedure for doing this in C#.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Matt Prince     Answered On: Nov 08

This page from MSDN:
msdn.microsoft.com/.../...for_c__code_examples.asp
lists out several dozen different tasks that you might want to perform with AD. You should be able to use the examples of Enumerating users  in a group  as well as Properties: Reading properties on directory  objects to accomplish what you need to do.

 
Didn't find what you were looking for? Find more on ADSI syntax Or get search suggestion and latest updates.




Tagged: