I've got a workflow that triggers when a document is updated in a site in SharePoint. The workflow should replace the inherited permissions with custom permissions from the items information.

Workflow, Call HTTP Web Service Info:

  • The Call HTTP Web Service Action's response returns: Unauthorized, and the permissions are unchanged.
    • REST Call: [%Workflow Context:Current Site URL%]_api/web/lists/getByTitle('[%Workflow Context:List Name%]')/items([%Current Item:ID%])/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)
    • Request Headers are added the the property of the action.
      • Both: Accept and ContentType are included in a Dictionary and have the value of application/json;odata=verbose
  • The Feature that lets a workflow read and write to items is activated.

So I'm I missing something. Because when I do the same "POST" from JavaScript everything works. The Permissions on the documents are no longer inherited.

    url: siteUrl + '/_api/web/lists/getByTitle(\'' + listTitle + '\')/items(\''+ itemId + '\')/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)',
    type: 'POST',
    headers: { 'X-RequestDigest':$('#__REQUESTDIGEST').val() },
    success: successHandler,
    error: errorHandler
  • 1
    Are you using App Step? – SlackerAmit Sep 29 '16 at 16:41

Your Answer

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

Browse other questions tagged or ask your own question.