I am trying to create groups on a SharePoint 2010 site via the UserGroup.asmx
web service. I am using jQuery and SPServices to interact with the web service.
When I try to create a group (via the AddGroup method) which is owned by a user it works fine:
groupName: "NewGroup",
ownerIdentifier: "UserOwner",
ownerType: "user"
When I specify another group as the owner I get a 400 error and a "Group cannot be found error":
groupName: "NewGroup",
ownerIdentifier: "GroupOwner",
ownerType: "group"
Using the same group name (GroupOwner) however, I can find it using the GetGroupInfo method of the UserGroups.asmx
web service. I have also tried setting the ownerIdentifier
to the ID of GroupOwner, which produced a 500 error.
Every example I can find of the AddGroup method only ever specifies users as ownerIdentifier
.
I am at a loss at this point - does anyone have any suggestions as to either what I'm doing wrong or where I should be looking for more information?