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 / grant access to a Shar...
Power Automate
Answered

grant access to a SharePoint group

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a SPD2010 workflow which gave SharePoint groups access to a list item depending on a field in the form.

So if field1 = a, group A would get edit permissions. If field1 = b, then group B would get edit permissions etc.

 

How can I replicate this (easily) in PA?

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    You can't replicate that easily in PA, there's no special action to assign permissions to SharePoint group. You'll have to use HTTP request for that:

     

    _api/lists/getByTitle('<listName>')/items(<itemID>)/roleassignments/addroleassignment(PrincipalId=<SPgroupID>,roleDefId=<roleID>)

     

    So it could look like this:

    image.png

    The <listName> and <itemID> placeholders are clear I suppose, so for the <SPgroupID>, that can be found in the URL on the group screen.

    image.png
    And for the <roleID>, here's a list of the default permission IDs:

    Default permission level IDs 
    Full Control1073741829
    Design1073741828
    Edit1073741830
    Contribute1073741827
    Read1073741826
    Approve1073741927
    View1073741832
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That's worked nicely. Thanks very much @tom_riha

  • nicoaca Profile Picture
    2 on at

    Hi, what about Document Libraries? This solution only apply to SharePoint lists, right?

  • MichaelSL Profile Picture
    10 on at

    As in your website always very helpful tips! Thank You Tom 🙂

  • OrcPeon Profile Picture
    43 on at

    I have a quick question regarding this HTTP-Request:

    Is it possible to have 2 Groups in addroleassignment(PrincipalId= 'Group 1' & 'Group 2') with the same roleDefId?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard