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
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: https://concurrencyinc.sharepoint.com/sites/products/_layouts/15/people.aspx?MembershipGroupId=9
Here is my call: https://concurrencyinc.sharepoint.com/sites/products/_api/Web/SiteGroups/GetById(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
.png.aspx)
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.
.png.aspx)
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.
