1

In Office 365 Sharepoint online, is it possible to use the interopt bridge to use actions from a 2010 workflow within a 2013 workflow?

http://msdn.microsoft.com/en-us/library/jj163929.aspx

What i am actually trying to do is to use this action: Replace List Item Permissions

To change the permissions on a document (Current item).

Thx

Update: I downloaded and installed the activities from Codeplex (http://sp2013workflowactivities.codeplex.com/releases). When i use the "Add role assignsment" activity i get this result: "AddRoleAssignment-BreakRoleInheritance Exception: Access denied. You do not have permission to perform this action or access this resource." In my workflow history. My user is the global admin, i use the "app step" and i have created the elevated permissions. My workflow looks like this: workflow

Did i miss anything for authentication?

0

yes the interop is available for workflows in O365.

I'm not a big fan of the previous workflow engine, but the new 2013 workflow engine has been incredible in terms of reliability and performance. The down side is that not all activities are represented. However - you can regain a lot of that functionality via REST calls from the Workflow flow it self.

In the case of item level permissions there seems to not be a documented method for breaking inheritance via REST. I have found this however that may be helpful

Source: http://spsite.pro/Blog/Post/3/SharePoint-2013-REST-API-%E2%80%93-How-to-set-Unique-Permissions-%28Item-Level-Permissions%29

BreakRoleInheritance

BreakRoleInheritance is just not documented and can be used using POST request:

https://your_sp_site.sharepoint.com/_api/web/lists/getByTitle('Test')/breakroleinheritance(copyRoleAssignments=true, clearSubscopes=true)

where copyRoleAssignments – “if true, this method copies the role assignments of the parent securable object when breaking inheritance; otherwise, this method adds the current user to the permission level that is required to manage the list item.” clearSubscopes – “Indicates whether subscopes should be cleared or not.”

AddRoleAssignment​​

Instead of the Add there is AddRoleAssignment method that also can be called using POST request (NOTE: this method works incorrectly in RTM release of SharePoint 2013!!!! It checks user within current item and if user is not found (usually as we’ve just broken inheritance) throws an exception. In SharePoint Online and March CU it works as expected):

https://your_sp_site.sharepoint.com/_api/web/lists/getByTitle('Test')/roleassignments/addroleassignment(principalid=20,roleDefId=1073741828) where principalid is id of user or group within current site collection. You can get a list of users by executing using GET: https://your_sp_site.sharepoint.com/_api/web/siteusers roleDefId is internal id of Role Definition (Read, Contribute, Full Control and so on). You can get a list of available role definitions using GET: ​https://your_sp_site.sharepoint.com/_api/web/roledefinitions

| improve this answer | |
  • I downloaded and installed the activities from Codeplex. When i use the "Add role assignsment" activity i get this result: "AddRoleAssignment-BreakRoleInheritance Exception: Access denied. You do not have permission to perform this action or access this resource." In my workflow history. How do i authenticate in a workflow? My user is the global admin, i use the "app step" and i have created the elevated permissions. – Jacob Filtenborg Oct 12 '14 at 14:14
  • You can just use the app step by itself. You have to enable the workflow as app permission feature and then manually register your workflow. See this: msdn.microsoft.com/en-us/library/office/… – Jesus Shelby Oct 12 '14 at 21:29

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.