1

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 )
dbones
  • 4,415
  • 3
  • 36
  • 52
  • 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 Jun 05 '09 at 14:47

2 Answers2

2

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.

nikmd23
  • 9,095
  • 4
  • 42
  • 57
  • hello, thanks for the reply, i was looking at this page (http://technet.microsoft.com/en-us/library/cc288074.aspx) and it says all of the permissions have this turned on. please can you describe in a little more detail, (where can i look on the site to make sure this permission is turned on). – dbones Jun 05 '09 at 14:25
2

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?

Abs
  • 1,339
  • 2
  • 12
  • 16