can i use AddUserToGroup

Jun 23, 2010 at 4:40 PM

how can i use the addusertogroup with spservices?

this is what i've tried:

 operation: "AddUserToGroup",
 webURL: "http://<server/site>/_vti_bin/UserGroup.asmx",
 groupName: "testgroup"
 userName: "testuser",
 userLoginName: "domain\\testuser",
 userEmail: "",
 userNotes: "test user"


thanks for any help

Jun 26, 2010 at 3:29 AM


I’m assuming that when you try the code you’ve posted, you are getting an error. One thing that I can see that is wrong is how you are specifying webURL.  It should just be a relative server path to a site, and is only useful if you want to call the Web Service with a different content than the current site.  The operation implies which Web Service will be called; you don’t have to specify it.  So try removing the webURL option and see if that solves the issue.


Jul 15, 2010 at 7:33 PM

I don't see the AddUserToGroup in the javascript code?

I was hoping to use the AddUserToRole web service function, but it likewise is missing...or perhaps I am missing something!


Jul 17, 2010 at 3:51 AM
Edited Jul 17, 2010 at 3:53 AM

Doh! Nathan, you're right. AddUserToGroup isn't in SPServices yet, nor is AddUserToRole.  My bad, and sorry jgengle.

I'll copy this to a work item in the Issue Tracker and get it into the next alpha.


Jul 17, 2010 at 3:52 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.