3
votes

I've been tasked with creating a SharePoint web part for our new web site. One of the things it needs to know is which AD groups the current user belongs to (each site user will belong to one or more special security groups within the domain.) Is there a part of the SharePoint API that exposes this information, or do I need to query AD directly?

2

2 Answers

5
votes

I would just do an LDAP query directly. This is much simpler and the LDAP interface to Active Directory is well documented.

3
votes

Check out these .NET namespaces.

System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.ActiveDirectory