0

I have created a SharePoint 2013 Workflow. This workflow first checks whether a user exists in a sharepoint group for example My_SP_GROUP or not by using HTTP GET request. If user does not exists then it adds that user in My_SP_GROUP using HTTP POST request.

The problem I am facing is that for POST request I am getting unauthorized error message, but for GET request it works fine.

{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

From SPO UI, I am able to add user in MY_SP_Group. I have followed this very nice article.

4
  • did you configure workflow for SPO? Commented Aug 20, 2016 at 13:49
  • Yes. I have give full control to the Workflow using AppInv.aspx Commented Aug 20, 2016 at 14:11
  • @nbi did you ever resolve this? I'm having the same problem. Commented Sep 8, 2016 at 16:25
  • @Carl not yet :( Commented Sep 8, 2016 at 16:57

1 Answer 1

2

When you set permissions for the app step did you set the scope to site collection?
The site groups cannot be edited from a web scope.
Note that there is no web in the scope below

<AppPermissionRequests>
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />
</AppPermissionRequests>

Thanks to Fabian Williams
http://www.fabiangwilliams.com/2014/06/19/gotcha-on-sharepoint-designer-workflows-in-app-step/

2
  • <AppPermissionRequests> <AppPermissionRequest Scope="sharepoint/content/sitecollection" Right="FullControl" /> </AppPermissionRequests> Commented Dec 8, 2016 at 6:28
  • Somehow the closing AppPermissionRequests gets trimmed from the answer :( Commented Dec 8, 2016 at 6:29

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.