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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,529)