Site icon @WonderLaura

Permissions Web Part: List of Site Owners

How would you like to have a nice pretty web part on the home page of each of your sites, showing a dynamic list of the people who are in the owners group for that site?  This is a great idea, because it gives the site users a quick reference list so that they know who to contact if they have questions about that site.

This solution is applicable in any version of SharePoint 2010 or 2007.

  1. First, you need to double-check your group settings.  If you want to be able to display it in a web part, the membership needs to be visible to everyone.  In Site Settings –> People and Groups, go to your group, and click Settings in the toolbar and Group Settings.  On that page, Who can view the membership of this group needs to be Everyone.
  2. Open your site in SharePoint Designer.
  3. In SharePoint Designer 2010, click Data Sources on the left. (If you have SharePoint 2007, here is my video on how to do web services in SPD 2007)
  4. Click the SOAP Service Connection button at the top.
  5. Go to the Login tab, and choose Use Windows Authentication.
  6. Go back to the Source tab.
  7. Type or paste in your site’s URL in the Service description location box, with /_vti_bin/usergroup.asmx at the end of it.  So mine looks like this:
    (This can just be the root of your site collection.  All of the sub-sites will have the same list of users and groups, so this URL won’t have to be changed for each different sub-site that you use this web part on)
  8. Click the Connect button.
  9. For the Port, I usually pick UserGroupSoap12, but I’m not sure if it matters which one you pick.
  10. In the Operation drop-down box, choose GetUserCollectionFromGroup.
  11. In the Parameters section, double-click groupName.  Type the name of your SharePoint group in the Value box.  Also, be sure to check the box The value of this parameter…
    Click OK.
  12. Your screen should look something like this.
  13. On the General tab, type the Name Site Owners.  Click OK.
  14. Create a blank (temporary) web part page in order to create a new data view web part.  (one way: in the browser, click Site Actions –> More Options… –> choose Web Part Page, and click Create. This will let you name the file and put it in any library)
  15. In SharePoint Designer, open the new page you created.  (You can click the little pushpin icon next to All Files on the left, and drill down to the library you put this new page in.  Open your new page and click Edit File.)
  16. Those blue rectangles on the page are web part zones.  Put your cursor in one of them.
  17. Click the Insert tab at the top, click the Data View button in the ribbon, and click the name of your new Site Owners data connection in that list.  You may have to scroll down in the drop-down to see it.
  18. Alright, there’s your list of site owners, but it’s a bit messy.  We don’t need all that stuff.  Click the Add/Remove Columns button in the ribbon.  Remove everything except the Name and email columns, and click OK.
  19. We’re going to make the email column a hyperlink to send each person an email.  You can alternately just remove the email column and leave just the name, and make the name a hyperlink instead.  Click to select the first person’s email address.  On the Insert tab, click Hyperlink.  In the Link To column on the left, click Email address.  In the Email address box, type mailto:{@Email}
    You can also type in a subject if you’d like, such as “Question about Team Site”.  Click OK.
  20. Save the page.  With your cursor in the web part you just created, click the Web Part tab in the ribbon.  Click the To File button.  Save this .WEBPART file off to your desktop or wherever.
  21. Go to your home page, and upload and insert this new web part onto your page.  There’s your list of site admins!
  22. Now, you can STILL use this same web part on all the other sites in this site collection, without having to go back into SharePoint Designer.  In my example, I have a site called Project A, and the name of the owners group is Project A Owners.  Go to the Project A home page, and Upload and insert that same web part.
  23. Open the web part toolpane (Edit Web Part) of the new web part you just inserted.  Click the Parameters Editor button.
  24. Find the parameter that says Name=”groupName”, and you’ll see that the default value says “Team Site Owners” (from step 11).  Change the text of Team Site Owners to say “Project A Owners” instead. (Note that if you didn’t check the box in step 11, you won’t see your parameter here).
  25. Click Save.  Click OK in the web part toolpane on the right side of the browser.
  26. Once you stop editing the page, and refresh the browser, you’ll see your new list of people, you just won’t see it immediately.  Done!

Note that I couldn’t get this to work in Office 365, because I can’t seem to get any of the web services to work in data view web parts like this.

Similar Web Parts

There are a couple of out of box web parts that do something similar, that are important to note.  (Thanks, Craig for your question about this in the comments below)

The Site Users web part will show a list of people who have permission to the site, and it lets you see their presence (online status) and quickly send instant messages to them or click on their name to see their profile.  In this particular case, I didn’t use this web part for a couple of reasons.  First of all, at this particular client’s workplace, they have no instant messaging client at all.  Secondly, most of the SharePoint groups simply contain active directory groups, which means that you wouldn’t be able to directly contact individuals.  The third reason was simply formatting.  They wanted the names displayed with the email address next to them.

The Contact Details web part is one that is very simple but pretty.  It lets you enter a single person’s name in the web part settings, and it displays some basic info about them, such as their picture, name and job title, with presence information.  Unfortunately, this is static information, and will not automatically change as people are added and removed from SharePoint groups.

Exit mobile version