I am using http web service to break permission inheritance for current item.for that I am using the following sequence.
1) fetching Request Digest value using following rest api endpoint:
_spPageContextInfo.webAbsoluteUrl + "_api/contextinfo"
I am getting response code :OK
for above query
2) Break Permission Inheritance using following endpoint(I am using above request digest in this query):
_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('listname')/items(itemId)/breakroleinheritance(copyRoleAssignments=true, clearSubscopes=true)"
I am getting response code :Forbidden
for above query
Edit :Things I have already tried
- activating feature "workflow can use app permissions".
- grant full permissions for workflow.
- adding action in app step.