Solved

How can I display Distribution Group membership lists in Sharepoint?

Posted on 2012-03-27
3
706 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 500 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 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