I have been able to create SharePoint groups successfully via a web service using the following article...
...But I want to assign another SharePoint group as the owner rather than an individual. It is successful when I add an individual user as the owner but when I add a group as the owner I get an error. Does anyone know if this is possible via a web service and if so where am I going wrong? Is it the owner type?
Solved! Go to Solution.
Yes that is correct. Through the standard SharePoint interface you are able to add either a single user or a single SharePoint group (which I have implemented in the past and worked correctly). I would like to add a single SharePoint group as the owner via the web service and this is where I am getting a issue.
You can set a existing (in the same sitecollection!) SharePoint-Group as the owner of a new group simple with the Webservice "_vti_bin/usergroup.asmx" :
The field ownerIdentifier has to be the name of the SharePoint Group as text column or text variable, not as people column!
The ownerType has to be "group"
Hope that works for you.
This is not working for me... Am I missing something? I have set up my fields exactly as shown above and the workflow is continuing to error.
how does your Webservice Action look like?
Whats the exact error message?
In my workflow i first create a admin/owner-group and than use the same groupname for the owner of the member-group and reader-group...
Here is a screenshot of my webservice action:
Here is the Workflow error message:
Failed to invoke web service. Error returned from server: <soap:Fault
of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
My first suggestion:
- "defaultUserLoginName" should be a string with your domain and backslash as prefix if you use ntlm authentication: domain\rzey
- The checkbox "Encode inserted tokens" should not be activated
- Please try to use an exitsting groupname (displayname) in this sitecollection instead of the variable varPermissionAdmin for debuging
I am sorry for the delayed response and testing.
I have made the suggested changes and am still getting an error, I have tried using the "Admin" string as a lookup from the list and tried hard coding the Group Name, both return the same resulting error. I have also tried changing the ownerType to group, and the results are the same.
i have had this before (will try and dig out the solution) but I think I created the group with a single person as the owner, then had another web service call to update the owner of that group to be the sharepoint group.