I tried to create a workflow to remove all the users and Groups from a site as the site ready to achieve. I had tried using UserGroup.asmx and Permissions.asmx but no luck. Is there any simple way to do it?
Not sure if this was conclusively answered but I had this task to accomplish and there were a couple of issues that I needed to sort out.
I needed to remove a given user from the site collection via the Call web service action. The workflow is on a sub site (InfoPath form library in my case) and for the Call web service action's URL input, I had used the "Web URL" reference and then appended the "/_vti_bin/usergroup.asmx" string. This threw an error when using the "RemoveUserFromSite" method. I exchanged the reference for the site collection URL (https://mysharepoint.myorg.com/sites/MySiteCollection/_vti_bin/usergroup.asmx) and it worked. Also, the credentials added to the action for this method must be a Site Collection Administrator and not just in the owners group.
So, with that action and method, you must reference the site collection URL and must credential it as a SCA.
Hope this helps.
When I came across this myself I created a Permission Management custom action. But the simplest way to Add and Remove groups from a site would be to download and use the UDA's from Vadim's blog. Nintex Workflow 2010 - SharePoint User Group UDAs - Vadim Tabakman
The UDA's predefined the activities to remove a SharePoint group using the UserGroup.asmx for you. Just simply provide the site URL and group name to remove. There are 4 UDA's that could be of help:
It is great post from Vadim, just for curiosity, It will be the case that Workflow can't go through the list of the permissions then modify them. Another word, workflow only can remove or update individual such as a user or a group having actually names.
I'm sorry I don't understand your questions, could you please clarify? But you can define a SharePoint group to a permission of an item.
I tried to say, is it true that the workflow only can add, update and delete any groups or users that you knew the name. And the workflow don't have ability to loop through the Site permission setting (in my case) to make the changes.
There are several WebService methods that can help you find a group, see http://msdn.microsoft.com/en-us/library/websvcusergroup.usergroup_methods(v=office.14).aspx
Just use the one that could fit your scenario. Hope this is helpful
Andrew Glasser, I have a similar scenario, except that the user is added directly to the site, and is not in a group. I also tried using the usergroup.asmx web service call, using the RemoveUserFromSite method, but no luck. I get an error that I'm not authorized to perform that action. Do you or Vadim Tabakman have any suggestions for that?
If removing a user from the site, it could be that the proper claims syntax may be necessary when picker a user to delete through the webservice.
Retrieving data ...