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 / Add Permission for SP ...
Power Automate
Answered

Add Permission for SP Group to a Folder

(1) ShareShare
ReportReport
Posted on by 217 Season of Giving Solutions 2025
I'm trying to grant access to a folder in SP using the HTTP card, keep getting string is not correct format, can anyone see the issue in this string?
 
_api/web/lists/getbytitle('<LibraryName>')/items('<Folder1>/<Folder2>')/roleassignments/addroleassignment(principalid=20,roleDefId=1073741830)
 
Categories:
  • abc 123 Profile Picture
    789 Moderator on at
    It's been a few years since I've tried, but I was never successful at ever setting a folder permission. My questions are probably still floating around unanswered. 
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at
    The items() method part of your id is using '<Folder1/<Folder2>'. However this method expects an itemid (which is a number).
     
    Can you lookup the itemid of the folder2 and try again?
  • Verified answer
    senna Profile Picture
    217 Season of Giving Solutions 2025 on at
    For anyone with this issue in the future, the below will work.
     
    _api/web/GetFolderByServerRelativeUrl('<libraryName/Folder1/Folder2>')/ListItemAllFields/roleassignments/addroleassignment(principalid=<IDofGroup>,roledefid=1073741826)
     
  • Suggested answer
    abc 123 Profile Picture
    789 Moderator on at
    To clarify, setting permission to a folder in a Document Library is simple. Setting them for a folder inside a regular list is impossible.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard