SharePoint groups are the backbone of access control within your SharePoint site, allowing you to organize users efficiently. However, managing group memberships can often be time-consuming and prone to errors. In this blog post, we’ll explore a solution that leverages the power of Power Automate to retrieve members of a SharePoint Group. We’ll walk through the steps to effortlessly retrieve SharePoint group members, saving you time and increasing overall productivity.
Understanding SharePoint Groups
SharePoint groups serve as a fundamental element for ensuring security and order in your SharePoint site. By grouping users based on roles or projects, administrators can easily assign permissions and manage access to specific resources. As your site grows, keeping track of these groups and their members becomes crucial for maintaining a well-organized and secure environment.
Why retrieve SharePoint group members
Consider a scenario where immediate access to the members of a SharePoint group is critical. Perhaps you need to notify all members of a SharePoint group of an important update or ensure that the right individuals have access to specific documents. Manually retrieving this information can be time-consuming and error-prone. This is where Power Automate steps in, automating the process and providing a reliable and efficient solution.
In this case we will be learning how an admin can get a list of groups in their SharePoint Site to ensure they know who exactly has access to their site.
Case Solution
Your first step is to go to Power Automate and use the “Instant Cloud Flow” as your way to start your flow from this link: https://make.powerautomate.com/environments/Default-3915f569-0a3a-4c4d-8e28-d973de1f4054/create
Next we will use “Manually Trigger a flow” to Start this Flow as shown below:

After that you will insert an new Action to “Send an HTTP request to SharePoint”:

Now is to populate the fields of the Site address, Method, Uri, and Headers as shown below using an “Send HTTP request to SharePoint” action we have named “Get list of SharePoint Groups in a Site:

You can copy the below text for your site for the above action:
Uri: _api/web/SiteGroups
Headers : accept application/json;odata=verbose
Your next action will be using the select action card to filter through all the JSON syntax and clear our results to show us only the “Title” and “Login Name” of our SharePoint Groups.

Now once we run the flow the results will be a list of all the SharePoint Groups in our SharePoint Site as we wanted. An example of this is shown below.

So now you have seen how to “Get A List of SharePoint Groups within a Site”. Let us know how it goes!