I would like to set list permission (not list item).
How can i do that with Nintex Workflow in O365 ?
Thanks in advance
Solved! Go to Solution.
Currently there's no an action to do this, but with some work you could use the action to call a web service and user the REST SharePoint methods.
Something similar to this >>> Set custom permissions on a list by using the REST interface | Microsoft Docs
Thanks for your response.
So I did three HTTP requests :
1] Get my group ID :
<site_url> /_api/web/sitegroups?$select=Id,Title&$filter=Title eq '<GroupName>'
2] Break role inheritance on my list :
3] Add my group permission to this list :
Note : Thanks to 'SviPullo' SviPullo: SharePoint RoleDefinition Ids
Role Definition Name | Role Definition Id
Full Control 1073741829
View Only 1073741924
Yes this approach work fine .
Can you send a user voice to your engineer service, to add this new action "Set List permission" ?
It's important for us and our clients to manage list permission fastly, so if the Nintex product can do this, it will be great !
Hi, I was curious if this method could be used to set permissions on a single list item. We cannot use the O365 update item permissions action due to the password being unencrypted.
Yes you can use this method but see the difference in the second request below :
1 - <site_url> /_api/web/Lists/Getbytitle('<ListName>')/items('<id_item>')/
2 - <site_url> /_api/web/Lists/Getbytitle('<ListName>')/items('<id_item>')/roleassignments/addroleassignment(principalid=<GroupID>,roledefid=<RoleDefinitionID>)
Thanks Ivan for taking the time to help me out.
I see in #1 that the inheritance is being cleared out on an item in a list.
In #2 it looks like the assignment is being added back in but for a group not for an individual user name.
For example if I wanted to break the perms and then set the perms on a list named testlist to read only on a single list item for myself it would look like this?
1 - ')/roleassignments/addroleassignment(principalid=stirns,roledefid=1073741826)
To add the current user or another user permission to the list item , if i see the documentation of Microsoft, you can put the UserID or GroupID.
So for example :
Get the UserID by LoginName :
If you don't have the information of your UserID but only LoginName, you need to do a call HTTP GET, to get the UserID by your LoginName.
WARNING : You need to have the LoginName Encoded ! Very Important ! If not, don't work !