views:

431

answers:

2

Hello,

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  A: 

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
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
+2  A: 

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
nice one, I made myself the Owner.. and it worked a charm!!! thanks
dbones

related questions