5

I've created workflow for breaking inheritance rule of list item. I am using breakroleinheritance command to break the role using Rest API call by workflow. After breaking the rule, I am assigning new role to list item.
Here is the code for Rest API:

https://my-websiteurl.com/_api/web/lists/getByTitle('Course Material')/getItemByID(1)/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)

I've passed header also:

Accept : application/json;odata=verbose
Content-Type : application/json;odata=verbose
X-RequestDigest : digestValue

I am getting digestValue properly by calling RestAPI correct.
When I call above API, I am getting UnAuthorized response in Log.

Reference Site : http://blog.appliedis.com/2014/10/09/sharepoint-designer-2013-workflow-working-with-web-services/

Note: Above code is working well with http, I am trying with https. I am also working with sharepoint designer 2013

1

Go to Site Settings - > Manage site features ->Activate "Workflows can use app permissions" and all the call to REST endpoint within the app step".

Refer the following url's for the actual steps:

https://msdn.microsoft.com/en-us/library/office/jj822159.aspx

http://summit7systems.com/app-step-or-impersonation-step-in-sharepoint-designer-2013/

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.