?
Solved

How can I display Distribution Group membership lists in Sharepoint?

Posted on 2012-03-27
3
Medium Priority
?
738 Views
Last Modified: 2012-03-28
We have several distribution groups set up, and I've been asked to add a page to our Sharepoint Site that contains lists of the distribution groups and lists all of the members.  Is there a way I can do this dynamically so that I dont have to edit the page each time a new user is added or someone's role changes?
0
Comment
Question by:cnit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 37772458
Hi!
If you are using Server Edition, you can try this:

UserProfileManager profileManager = new UserProfileManager ();
MemberGroupManager groups = manager.GetMemberGroups();
foreach (MemberGroup group in groups)
{
     foreach (string user in group)
     {
      ///display user
     }
}
0
 

Author Comment

by:cnit
ID: 37773587
I'm sorry but I'm not sure where I would put the code that you have supplied.  Is this considered a Server Side Script, and if so does this article apply?
http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-server-side-script-as-a-data-source-HA010119472.aspx

Right now, we are using a List to keep our group membership info, which is basically a big text box.

We are using Sharepoint Services 3.0 on Windows 2008 Standard.

Thanks
0
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 2000 total points
ID: 37775152
Hi!
This is a server side code and you can put in a custom webpart or directly in page markup (you should be familar with ASP.Net development for that). But any way this code will not work in WSS 3.0 (it is only for MOSS 2007 or SharePoint Server 2010).
If you have membership info in a custom list (not AD groups) you can try to use standard listview or dataview webpart or create a custom webpart.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question