This project has moved and is read-only. For the latest updates, please go here.


Sep 15, 2011 at 4:45 PM


I tried to use a method that became supported in v6.0:  UserGroup.AddUserCollectionToGroup but have not been able to get it to work.

  operation: 'AddUserCollectionToGroup',
  groupName: 'All_Users',
  usersinfoxml: '<Users><User LoginName="SPS\\smith"></User></Users>'
  async: false

I noticed in firebug that SPServices generates a soap:body with

<groupname> and <usersinfoxml> 

tags that matche the .../_vti_bin/UserGroup.asmx?op=AddUserCollectionToGroup page except that the tags on the asmx page are caml cased.

I am probably not specifying the usersinfoxml value correctly, but also, if I specify that parameter as "usersinfoxml" (as I show in the code snipped above) a "value does not fall within the expected range" error is returned from the server, and if I specify it as "usersInfoXml" I get an XML parsing error. I see these errors in Firebug.

When using the code snippit above, the groupName seems to be picked up fine by SPServices (when looking at the Post tab in Firebug), but the XML I tried to pass through the usersinfoxml parameter is not posted to the server (in other words, the userinfoxml tag is passed to the server with no value).

Thanks in advance for any help!!

Sep 15, 2011 at 5:31 PM

I have it working now; the problem was a typo, and BTW the tag case that SPServices generates does in fact exactly match the tag case in specified the asmx; in Firebug's Post tab, I should have gone by the unformatted code in Source section, and not by the formatted code in the XML section (which is far easier to read but lowercases everything). Sorry for the confusion.

Sep 21, 2011 at 2:25 PM

Glad you got it working!