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? Aug 20, 2016 at 13:49
  • Yes. I have give full control to the Workflow using AppInv.aspx
    – nbi
    Aug 20, 2016 at 14:11
  • @nbi did you ever resolve this? I'm having the same problem.
    – Carl
    Sep 8, 2016 at 16:25
  • @Carl not yet :(
    – nbi
    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

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.