Small Tips and Tricks : Power Platform – Power Automate – simple Power Automate to get all site groups of SharePoint online site

Hi All,
Greetings for the day!!!
Today new small tip and trick. Today’s tip regarding Power Automate.
Details / Background
- We were automating the process of adding user to given group for our users
- Here we maintained one list in our SharePoint online site with following schema
- User – Person and Group – only Persons are allowed
- Group – Person and Group – only Groups are allowed
- Here respective selected User will get added to given Group
- Here we need groupid and to get group id we need to get all groups and find our group which is added in list and get group id
- So here small tip – how to get all site groups in Power Automate
Detailed Steps
- For demo purpose we will create – “Instant cloud flow“, so that we could trigger it manually as
- After creating “Instant cloud flow” we have an manual trigger as

- As we select “Manually trigger a flow“, we are ready to edit the flow

- Next step is too add an action – “Send an HTTP request to SharePoint“. We have very good article on calling SharePoint REST API from Power Automate – https://knowledge-junction.in/2022/07/12/power-platform-power-automate-calling-sharepoint-rest-api/
- search for text “http” and select action – “Send an HTTP request to SharePoint“
- Once we added an action – “Send an HTTP request to SharePoint“, we are read to use the REST API to get all the sitegroups
- REST API to get all the site groups – _api/web/sitegroups

- Save the flow and we are ready test

Test the flow
- Lets test the flow. We will do manual testing
- Click on an option “Test” at right top corner
- On click of “Test” link, right Test panel will appear as shown in below fig

- As flow get successfully executed we could verify the flow as

References
- Frequently used REST APIs – Part 1 – https://knowledge-junction.in/2022/09/01/frequently-used-rest-apis-part-1/
- Power Platform : Power Automate – calling SharePoint REST API – https://knowledge-junction.in/2022/07/12/power-platform-power-automate-calling-sharepoint-rest-api/
Thanks for reading !! If its worth at least reading once, kindly please like and share !!! SHARING IS CARING 🙂
Enjoy the beautiful life !! Have a FUN !! HAVE A SAFE LIFE !! TAKE CARE 🙂
1 Response
[…] Small Tips and Tricks : Power Platform – Power Automate – simple Power Automate to get all site groups of SharePoint online site – https://knowledge-junction.in/2022/10/11/small-tips-and-tricks-power-platform-power-automate-simple-… […]
You must log in to post a comment.