1
votes

Im trying to run a command on the AddUserToGroup method via webservices (UserGroup.asmx).

I set up the code as follows.

//set up the user group
userGroup = new UserGroup.UserGroup();
userGroup.Url = vtiBin + "/UserGroup.asmx";
userGroup.Credentials = CredentialCache.DefaultCredentials;

So I have my credentials being passed to the webserive. Now I run the following

userGroup.AddUserToGroup("System Group", preferedName, userLogin, email, "");

this throws an exception, my account does not have permission. however if I run this code under a different user with GOD access it works

What is the minimum required permission??

I have given my account

  • Full Access to the User Information List (on the sharepoint site)
  • Manage Analytics, Manage Audiences, Manage User Profiles, Personal Features, Personal Site, Set Permissions (sharedServices Admin, Personalization services permissions )
2
when i make my account a "Site Collection Administrator" it works, however when i remove my account from that group and change my permissions via the "Advance Permissions" (ticking all the boxes -Full Control, Design, Contribute, Read, View Only, Personal Edit, Manage Hierarchy, Approve, Restricted Read ) it does not work. it seems im missing somthing here, as being a site Collection admin is over kill (as this is a admin for multiple sites, i just want to affect a group on my site)dbones

2 Answers

2
votes

Couldn't this also have more to do with the permission to manage the group rather than permission to use the web service? I know I've run into similar situations via the UI before, and it turned out that I didn't have permissions to edit the group's membership. I believe there are a few situations in which you have permission to edit a group's membership:

  • You are the creator of the group
  • The creator of the group (or a site collection administrator) designated you as an owner of the group
  • The group was configured to allow all group members to edit its membership, and you are a member of the group
  • You are a site collection administrator

Is it possible that none of those conditions fit for you?

2
votes

There is a permission in SharePoint to allow for web service calls. It's called "Use Remote Interfaces". Your user should have this permission to make changes via web services.