0

In a SPD 2013 workflow, how is the 'UseUniquePermissions' parameter configured when it's set to 'true' in order to create unique permissions for a site? how do you declare and grant user(s) to have a specific permission?

I can't find any documentation/examples for configuring that parameter to set unique permissions (UseUniquePermissions). All examples show the parameter set to false for inheriting permissions.

enter image description here

Anybody here have tips?

  • Are you coding a solution with the REST Api's in any particular language? Server-side? Client-side? – Graham Aug 3 '17 at 18:04
  • To grant unique permissions the way is set BreakRoleInheritance property and set roles. See an example how it is doing programmatically projectservercode.com/… – Venkat Konjeti Aug 3 '17 at 18:04
  • I need to do this with a SharePoint Designer based workflow – davjaq Aug 3 '17 at 18:13
0

In the SPWeb object, you have a HasUniqueRoleAssignments property to check the web has unique permissions. You can not set this property.

Here are the steps

  1. Create site.
  2. Break the permissions using a second rest call

    newsiteurl/_api/web/breakroleinheritance(true)

  3. Add new role assignments using below example rest api call

    newsiteurl/_api/web/web/roleassignments

Go through the following articles to get full details on this calls.

How to break permissions

How to grant permissions

Make sure in the workflow you should use the Call HTTP Web Service action.

  • Is this used in conjunction with the "UseUniquePermissions" parameter set to true? – davjaq Aug 3 '17 at 19:25
  • No. With out that parameter create a site. – Venkat Konjeti Aug 3 '17 at 19:34
0

I assume OP has solved his question, but for future reference. If creatng a site with the parameter UseUniquePermissions = true then a call to the andpoint grants permission to the user/group:

_api/web/roleassignments/addroleassignment(principalid=[principal id of group/user],roleDefId=[Role defination id of the permission level])

Notice the two placeholders en brackets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.