I was at a client recently and was not allowed to run any powershell commands but needed a list of accounts that existed in a SharePoint Group in a table format. I also was not allowed site collection administration permission. I tried a few different options in which trying to manipulate the list view of the group and using Excel data connections to get back to SharePoint but no option worked very cleanly.
What I ended up using was a REST call to get the users and then downloading the XML response and opening it with Excel. Use this link to learn about the available REST api's for users & groups
Here are the steps....
1. Get a client that you can use to test REST calls
- I use Advanced REST Client for Chrome.
2. Construct the REST call to get a list of users by group
The structure looks like this: https://siteurl/_api/web/sitegroups/getbyid(groupid)/users
- To get the group ID simply navigate to the members page of your SharePoint Group and look at the number at the end of the URL Here is the URL of my "Product Members" group: http://ift.tt/1Q8DsI19
Here is my call: http://ift.tt/1ROjVLc(9)/Users
- We will see the users returned in the entry area of the response.
3. Download the XML response
- In the Advanced REST Client click Save as file and then Download in the response section.
4. Change the file type
- The file will download as a .text-plain file type. Edit the filename and change it to a .xml file type.
5. Open with Excel!
- In Excel browse and pick out the new .xml file you created and select open this file as an XML table.
- Take a second and look at your pretty data.
6. Remove duplicates
- The data comes across in a way that there are 2 rows for each user. We can clean that up by removing the duplicates based on the login name. First click anywhere in the imported table and under the Data tab click Remove Duplicates.
- Click the Unselect All button then scroll down and check ns4:LoginName
- That will remove your duplicate logins and you will have emails and logins that you can use whatever way you need.
Handy appendix?
I know this post is titled how to get a list without powershell but I wanted to just include this down here as this is an easier approach if you have the ability. Here are the commands to get a list of users in a SharePoint Group via powershell.
- Get-SPSite http://server/sites/yoursite | Select -ExpandProperty RootWeb | Select -ExpandProperty Groups | Where {$_.Name -EQ "group name"} | Select -ExpandProperty Users | Select Name, Email| Export-Csv c:\scripts\users.txt
Here is the command to do it with SharePoint Online
- Get-SPOUser -Site http://ift.tt/1Q8Du2G -Group "group name"
Handy links!
- How to: Use PowerShell to Create and Manage Users and Groups in SharePoint Online
- Exploring SharePoint Users, Groups, and Security Using PowerShell
Originally Posted
Exporting SharePoint Group Members to Excel Without PowerShell
by Drew Madelung via Everyone's Blog Posts - SharePoint Community
This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.
ReplyDeleteSharepoint Training in Chennai