cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous ,

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,388)