Microsoft 365 : SharePoint Online – Get the Group Membership ID from UI / Fetching all the users of SharePoint group using REST API

Hi All,
Greetings for the day!!!
Today just small post for reference since it is required in multiple posts
In this article we will discuss how to get / know / identify Group Membership ID and REST API to get users from the respective group
Background :
- In one of our project we need to get all the users who are members of SharePoint group
- We will be using REST API to get all the users who belongs to respective group – _api/web/sitegroups(6882)/users
- Here as in above REST api sitegroups contains the parameter – Group Membership ID – sitegroups(<Group Membership ID>)
Steps to get the Group Membership ID from UI
- SharePoint groups scope is at site collection level
- Navigate to SharePoint site collection from where group is created
- Once we are on SharePoint site collection – we need to navigate to Site Permissions page (_layouts/15/user.aspx)
- From site gear icon (right top corner) navigate to “Site Permissions” option
- On click of “Site permissions” link, right pane / blade / dialog – “Permissions” will open as shown in below fig
- From “Permissions” pane, click on “Advanced permissions settings” link from the bottom.
- We will be redirecting to “_layouts/15/user.aspx“
- “Site permission” pages enlists the list of groups and users with respective permissions as shown in above fig
- Click on the group of which we need to see the Membership Group ID
- Here as in above figure, I’ll click on “Knowledge Junction” group
- We will be redirecting to the given group – people.aspx page (_layouts/15/people.aspx) along with Membership Group ID
- Please notice in address bar we will get the value – Membership Group ID for the selected group as shown in below fig
- MembershipGroupId is querystring parameter for people.aspx page
Thanks for reading the article !!! Please feel free to discuss in case any issues / suggestions / thoughts / questions
HAVE A GREAT TIME AHEAD !!!
1 Response
[…] We have a separate article to get / know the Group Membership ID, please have a look – Microsoft 365 : SharePoint Online – Get the Group Membership ID from UI / Fetching all the users o… […]
You must log in to post a comment.