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?
Solved! Go to Solution.
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:
The <listName> and <itemID> placeholders are clear I suppose, so for the <SPgroupID>, that can be found in the URL on the group screen.
And for the <roleID>, here's a list of the default permission IDs:
Default permission level IDs | |
Full Control | 1073741829 |
Design | 1073741828 |
Edit | 1073741830 |
Contribute | 1073741827 |
Read | 1073741826 |
Approve | 1073741927 |
View | 1073741832 |
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:
The <listName> and <itemID> placeholders are clear I suppose, so for the <SPgroupID>, that can be found in the URL on the group screen.
And for the <roleID>, here's a list of the default permission IDs:
Default permission level IDs | |
Full Control | 1073741829 |
Design | 1073741828 |
Edit | 1073741830 |
Contribute | 1073741827 |
Read | 1073741826 |
Approve | 1073741927 |
View | 1073741832 |
Hi, what about Document Libraries? This solution only apply to SharePoint lists, right?
As in your website always very helpful tips! Thank You Tom 🙂
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?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
63 | |
27 | |
21 | |
15 | |
14 |
User | Count |
---|---|
123 | |
46 | |
44 | |
35 | |
31 |