none
Simple 2013 Workflow to break permissions inheritance on a Document Library File?

    Question

  • Anybody got an example of this? Suspect SPD 2013 can't do it and that it must be using VS 2012.

    Want a simple solution of a Doc library where users drop files in, but then, users can only View, Edit, Replace and Delete files they created.


    ============================
    Thank You
    cyberpine.com

    Saturday, June 08, 2013 1:21 PM

Answers

  • As I said, I don't think there is an action for changing Item level permissions in the 2013 workflows.  Whether its VS or SPD, 2013 workflows are declarative and may run on another physical server so there is no action for changing item level permissions in either SPD or VS 2012 when creating a 2013 workflow.  The closest you can come is that you can call an xml web service, so you would have to use the permissions web service in SharePoint.  But that only allows permission changes to webs or lists, not items. 

    As I said, I think for this you'll have to continue to use the 2010 workflow or write your own web service.


    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Tuesday, June 11, 2013 4:42 PM
  • When using a 2010 Workflow you need to add an impersonation step to get the Replace permissions Action.  I just tried it with an SPD workflow in my copy of SPO (which has been upgraded to 2013) and it works fine.  2013 workflows don't have an impersonation step, so there is no replace permissions action.  The actions/steps are greyed out unless you've selected an appropriate slot in the designer.  Could that be what is happening?

    Although there are API available on the SharePoint server to change list item permissions you can only use that in code running on the server, which you can't do in SPO.  You wouldn't be able to use this in Azure or another provider.  You could use them in a custom web service created for an OnPrem 2013 environment.  For SPO you can only use client side code or web services that already exist.  As I mentioned previously the permissions web service doesn't go down to the item permissions level.  I'm also not aware of any CSOM that can change permissions on list items at this point either.


    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Wednesday, June 12, 2013 12:45 PM

All replies

  • I don't think you can do this with a 2013 workflow.  But you can easily do it using a 2010 workflow built with SPD 2013.  ONe of the differences between 2010 and 2013 workflows in 2013 is that 2010 has an action for changing permissions but 2013 workflows don't.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Saturday, June 08, 2013 2:26 PM
  • what about with a VS 2013 Workflow.

    ============================
    Thank You
    cyberpine.com

    Tuesday, June 11, 2013 3:24 PM
  • As I said, I don't think there is an action for changing Item level permissions in the 2013 workflows.  Whether its VS or SPD, 2013 workflows are declarative and may run on another physical server so there is no action for changing item level permissions in either SPD or VS 2012 when creating a 2013 workflow.  The closest you can come is that you can call an xml web service, so you would have to use the permissions web service in SharePoint.  But that only allows permission changes to webs or lists, not items. 

    As I said, I think for this you'll have to continue to use the 2010 workflow or write your own web service.


    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Tuesday, June 11, 2013 4:42 PM
  • When I attempted to use SPD WF 2010 against SPO 2013 the actions/steps in question seemed to be grayed out.

    Dumb question,  at a high level, how might our own web service work? Create/Edit item event driven?  If for SPO, preusming the service would be hosted outside of SP, on-prem and or in Azure right?  There are classes in the object model to change item level permission right? Can you think of any limitations in SPO vs SP On prem 2013 in trying to do the above.

    Thank You.


    ============================
    Thank You
    cyberpine.com


    • Edited by o365spo Wednesday, June 12, 2013 11:33 AM
    Wednesday, June 12, 2013 11:09 AM
  • When using a 2010 Workflow you need to add an impersonation step to get the Replace permissions Action.  I just tried it with an SPD workflow in my copy of SPO (which has been upgraded to 2013) and it works fine.  2013 workflows don't have an impersonation step, so there is no replace permissions action.  The actions/steps are greyed out unless you've selected an appropriate slot in the designer.  Could that be what is happening?

    Although there are API available on the SharePoint server to change list item permissions you can only use that in code running on the server, which you can't do in SPO.  You wouldn't be able to use this in Azure or another provider.  You could use them in a custom web service created for an OnPrem 2013 environment.  For SPO you can only use client side code or web services that already exist.  As I mentioned previously the permissions web service doesn't go down to the item permissions level.  I'm also not aware of any CSOM that can change permissions on list items at this point either.


    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Wednesday, June 12, 2013 12:45 PM
  • Hi. In SPO, you can call rest api with SharePoint Designer 2013 workflow. 

    api reference

    http://msdn.microsoft.com/en-us/library/office/dn531433(v=office.15).aspx

    Thursday, July 03, 2014 5:01 PM