Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

Unauthorized response for Rest API use in SharePoint 2013 workflow - Office 365

$
0
0

Hello,

I am working on setting item level permissions on InfoPath form in SharePoint Designer 2013 workflow. As direct actions to set permissions are not available in SharePoint 2013 workflow, i am using Rest API calls to break the permission inheritance and set the permissions.

In APP STEP of SharePoint Designer 2013 workflow, I am querying the group properties by using GET - Rest API request and it is working. Now to break the permission inheritance using POST - Rest API as shown in example below:

https://<sitecollectionurl>/_api/lists/getbytitle('ListTitle')/items(40)/breakroleinheritance(true)

But this is returning me "unauthorized" response code.

I tried following work around but they did not worked

1. Set Authorization in request header and its value as blank,  this resulted in "forbidden" response code

2. http://sitecollectionurl/{catalog site}/_layouts/15/appinv.aspx - I added the app permissions xml as follows and did trust it for workflow app, but still facing unauthorized error.

<AppPermissionRequests>
<AppPermissionRequest Scope="https://sitecollection/web" Right="FullControl" />
</AppPermissionRequests>

Note: I have manually broken permissions of one form and assigned permissions to few user, so the user i am using to configure workflow does have required permissions.

Is there any other configuration required to make this work, or am I doing anything wrong.

If anyone has any ideas on making this work?

Thanks in advance


Viewing all articles
Browse latest Browse all 10096

Trending Articles