Tuesday 10 August 2010

SharePoint 2007 - Finding Group Membership of Users (Active Directory or SharePoint) through UserProfileService.asmx

By using the SharePoint 2007 (and above) Out-Of-The-Box "User Profile" Web Service found at the following location:
http://ServerName/_vti_bin/UserProfileService.asmx

You can easily obtain information about the group membership (both Active Directory and SharePoint Groups) of a particular user - not just their basic user profile information (e.g. Mobile, Manager). This can be done with the GetCommonMemberships() method.

In this way, without code and without directly accessing Active Directory/LDAP, you can find the group memberships of a user for consumption in an InfoPath form by consuming it as a Web Service-based datasource.

For implementation details of a code-free InfoPath consumption of this web service, see: 
http://claytoncobb.wordpress.com/2009/07/19/infopath-user-roles-in-browser-enabled-forms-using-groups/

DDK

1 comment:

Anonymous said...

Thanks for providing nice information "SharePoint 2007 - Finding Group Membership of Users (Active Directory or SharePoint) through UserProfileService.asmx"
IT News