web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get an array of all se...
Power Automate
Answered

Get an array of all security groups a Sharepoint site has

(0) ShareShare
ReportReport
Posted on by 179

Hello!

I'm doing great so far with PA scripts but I have a challenge I can't find the solution to. I want to get a list (preferably an array) of all security groups within a single Sharepoint site. I know I can find the ID of a group if I do a "Send an HTTP request to Sharepoint" if I provide the name of this group and vice versa.

 

But in a scenario where I want to extract all these security groups. What can PA do? Please help 🙂

Categories:
I have the same question (0)
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Did you mean SharePoint groups or AD Security Groups?

    You can get SharePoint groups using the /_api/web/sitegroups endpoint.

    To query security groups, you need the GRAPH API

     
     

    SudeepGhatakNZ_2-1670200755296.png

     

     

  • Volt26 Profile Picture
    179 on at

    It looks like a perfect answer but may I ask you how to get the site value variable?
    I trigger the flow manually.. I'll mark it accepted as soon as I can get this one working 🙂

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    You need to simply provide the displayName of the group after that.

    https://graph.microsoft.com/v1.0/groups returns all groups and I am simply filtering out the one with a specific display name.

     

     

     

  • Volt26 Profile Picture
    179 on at

    To be honest, I couldn't figure out how to use what you tried to show me...

     

    I got the list of groups by doing this instead :

    chrome_Yxz4EZ6QrC.png

     

    Can your solution achieve the same goal in a quicker way? A bigger sample would be appreciated because right now, only my way works, yours returns a ton of information but none of it is a Sharepoint security group...

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    You are on the right track @Volt26 ! I would have used the same logic if I were you.

    Your logic is returning SharePoint Groups, while the one I demonstrated via GRAPH API returns Azure AD Groups.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard