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

Community site session details

Session Id :
Power Automate - Building Flows
Suggested Answer

How to cycle all SharePoint folders and get access permissions for each?

(0) ShareShare
ReportReport
Posted on by 169
Hello,
 
How to cycle all SharePoint folders and get access permissions for each?

I want to do this to keep an eye on who has access to what. I will save the results in an excel file. We use local sharepoint security groups but we can't easily figure out on what folder each group has access to. The power automate I would like to create would solve this issue.
 
Thank you!
I have the same question (0)
  • Suggested answer
    chiaraalina Profile Picture
    1,125 on at
    How to cycle all SharePoint folders and get access permissions for each?
    Hi 
     
    You’ll have to use the SharePoint REST API via Send an HTTP request to SharePoint”action.
     
    1. Get all folders:
     
    _api/web/lists/getbytitle('Documents')/items?$select=Id,FileLeafRef,FileRef,FSObjType&$filter=FSObjType eq 1&$top=5000
     
    FSObjType eq 1 = Folders only
     
    2. Parse JSON
     
    3. Apply to each loop and inside
    _api/web/GetFolderByServerRelativeUrl('@{items('Apply_to_each')?['FileRef']}')/ListItemAllFields?$select=Id,HasUniqueRoleAssignments,RoleAssignments/Member/Title,RoleAssignments/Member/PrincipalType,RoleAssignments/RoleDefinitionBindings/Name&$expand=RoleAssignments/Member,RoleAssignments/RoleDefinitionBindings
     
     
    Let me know if it helps!
  • Volt26 Profile Picture
    169 on at
    How to cycle all SharePoint folders and get access permissions for each?
    I got step 1 and 2 but I have no idea how to do step 3... it looks like a copy-paste code but I've never done that in power automate.. The UI requires to enter stuff without code... 

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard