2013 Workflow BreakRoleInheritance is not applying(working) properly

Copper Contributor
  • I have created workflow (Platform Type: SharePoint 2013 workflow) using SharePoint designer 2013.
  • In this workflow I had to change the item level permissions for the item on which this workflow would be running
  • And also need to change the item level permissions on the workflow task created through it.
  • Prior to this August the workflow was running absolutely fine but suddenly the break role inheritance just stopped working and the workflow didn't work as expected.
  • The item is accessible to all site members but this should not be the case as I tried to make it editable only by the creator of that item and his/her Manager.
  • Also, the tasks are being assigned to a specific group say approver group so to make the task assigned to be editable by only approver group members I had again used the break role inheritance to achieve this
  • The workflow actions are as follows:
    • To break the role inheritance: - [%Workflow Context:Current Site URL%]/_api/web/lists/getbytitle('[%Workflow Context:List Name%]')/items('[%Current Item:ID%]')/breakroleinheritance(copyroleassignments=false, clearsubscopes=true)
      • called this using http web services call action using POST method
      • supplied the request header digest along with Accept and Content-Type in the Request Header
    • To assign role/permissions to the item: - [%Workflow Context:Current Site URL%]/_api/web/lists/getbytitle('[%Workflow Context:List Name%]')/items('[%Current Item:ID%]')/roleassignments/addroleassignment(principalid='[%Workflow Context:Initiator%]',roledefid='[%Variable: ContributeRoleDefId%]')
      • In this the contribute role definition id is obtained using http GET method and stored in the ContributeRoleDefId variable and assigned using POST method.
      • all others are assigned the read role definition id.

Need a reason why this is happening and how to solve this issue.

10 Replies

I'm able to reproduce this in my tenant as well. It appears to be a bug in O365.

@Alina Skarbovsky Is there any chance you could help?

Sorry, not my area of expertise, maybe @Kerem Yuceturk can help with this.

I would recommend opening a support ticket. 

Hi Dean, we opened a support ticket but the support team rejected it because they classified it as developer support, even though this is a bug in an OOTB web service.

Hi @Dimitri Ayrapetov@Ashwin Kheta, does this also fail outside of the workflow context? Or only when you use it from within workflows?

Hi @Kerem Yuceturk, we have confirmed that it is working via PowerShell and CSOM but still failing within the workflow context. I would be happy to setup a Skype meeting to demonstrate the problem.

Hi @Kerem Yuceturk, is there any other information I can provide?

 

Thanks,

Dimitri

 

Hi @Kerem Yuceturk, is there anything else that can be done to continue this forward?