cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
testuserburak
Regular Visitor

Sharepoint Folder Unique Permission

Hi, I have a SharePoint site with folders in a library, each root folder will have unique permission (people from outside of the organization).

How can I add a step in flow, that when a file is created an email will be sent only to the people who have access to the folder?

I have already flow which will trigger when a file is created in the library.

1 REPLY 1
tom_riha
Super User
Super User

Hello @testuserburak ,

I'd start with the assumption that the file will inherit permissions from the folder, therefore, if you get permissions on the current file it'll be the same as the permissions on the folder.

  1. HTTP request: list permissions on the file
    1. Method: GET
    2. Uri: _api/web/lists/getByTitle('[ListName]')/items([ID])/roleassignments
  2. Parse JSON: parse the result, it'll give you dynamic content 'Principal Id' = ID of the users with access
  3. HTTP request: get user information based on the 'Principal Id'
    1. Method: GET
    2. Uri: _api/web/SiteUserInfoList/Items([Principal Id])
  4. Parse JSON: parse the result, it'll give you the user data, among them their 'EMail'
  5. Send an email to that 'EMail' address (or append them in some string variable and then send a single email to that variable all after the 'Apply to each')

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,541)