0

I'm trying to provide a better process than the current process of checking files out when they are finalized to make them read-only. We have a status field called archive that once this is triggered I would run a workflow to do what needs to be done. I tried using a REST POST based on some sites I've seen and it does not seem to work. I get a badRequest as my response to the REST call.

My workflow updates the current items content-type to one of Archive and then I run my REST operation to break privileges. I have not gotten any further since breaking privileges is not working.

This is my REST POST call. I have full rights on this list.

[%Workflow Context:Current Site URL%]/_api/lists/getByTitle(‘[%Workflow Context:List Name%]')/items('[%Workflow Context:Current Item:ID%])/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)

I want to break inheritance of privileges and then assign any groups that were associated to this file to read-only with the exception of any owner groups

1 Answer 1

0

Easier than REST is to use a 2010 based workflow, which is still available in SharePoint 2013 (and 216 and 2019). 2010 Workflows have a rich set of actions for setting permissions, including "remove list item permissions" and "replace list item permission". Note, the only way you'll see these actions is if you're in an "impersonation step", which can be added via the ribbon.

1
  • You mean the equivalent as app step. Thank you for the suggestion, but I will use a 2010 WF as a last resort. I know that we had issues firing off 2010 workflows when we were online. I don't recall the details Sep 18, 2019 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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