How to Remove Group From SharePoint Site Using NINTEX Workflow

Introduction

In this article you will see how to remove a group from a SharePoint site using a NINTEX workflow. We will be removing the group from a SharePoint site by calling the web service "_vti_bin/usergroup.asmx". I have created a custom list named "Group Provisioning" in which I have the following columns:

Group -Provisioning

The Group Name column is used to specify the group to be deleted.

Workflow Design

Workflow-Design

The Group Exists UDA is a user defined action that is used to check if the group exists. Please refer to the following articles:

  1. How to Check if SharePoint Group Exists Using NINTEX Workflow
  2. How to Create User Defined Action For NINTEX Workflows in SharePoint

Set a condition sets the Yes or No value. Call the web service action to remove the group from the SharePoint site.

Remove group workflow

1. Navigate to the Group Provisioning list.
2. Click on the "List" tab and then click on "Workflow Settings".
3. Click on "Create a Workflow" in the Nintex Workflow.

Create-a-Workflow-in-Nintex-Workflow

4. Click on "Cancel".

Cancel-a-Workflow-in-Nintex-Workflow

5. Drag and drop the Group Exists UDA action from the User defined actions section.

Group-Exists-UDA

6. Click on "Configure" from the drop down list in the Group Exists UDA action.

Group-Exists-UDA-action

7. Click on the "Variables" button in the ribbon interface.

ribbon-interface

8. Click on the "New" button.

ribbon-interface1

9. Enter the variable details.

ribbon-interface2

10. Click on "Save".
11. The Workflow variable is created successfully.

ribbon-interface3

12. Click on "Close".
13. Enter the Input and Output parameters for the UDA as shown below.

ribbon-interface4

14. Click on "Save".
15. Drag and drop the "Set a condition" action from the "Operations" section.
16. Click on "Configure" from the drop down list.

ribbon-interface5

17. Set the condition as shown below.

ribbon-interface6

18. Click on "Save".
19. Drag and drop the Call web service action from the Integration section for the true condition.
20. Click on "Configure" from the drop down list.
21. Click on the "Insert Reference" button for the URL column and then click on "Common" tab. Select "Web URL" and then click on "Ok".

ribbon-interface7

22. Append "/_vti_bin/usergroup.asmx" in the URL column.
23. Enter the User Name and Password to call the web service and then click on the "Reference" button.
24. Click on "Ok".

ribbon-interface8

25. All the web service methods will be populated. Select the RemoveGroup web method to be used to remove the specified SharePoint group.

ribbon-interface9

26. The Web Service Input section will be populated for passing the input values to the web method.

ribbon-interface10

27. Click on the "Insert Reference" button for the groupName column and then click on the "Item Properties" tab. Select "Group Name" and then click on "Ok".
28. Click on "Save".

Publish the workflow

1. Click on the "Publish" button in the ribbon interface.

Publish-the-workflow

2. Make sure the Title is set; optionally you can set the values for Description and Change Comments.

Publish-the-workflow1

3. Click on the "Submit" button.

Publish-the-workflow2

4. The workflow is published successfully.

Publish-the-workflow3

Test the workflow

1. Navigate to the Group Provisioning list.
2. Select the item and then click on "Workflows" in the ribbon interface.

Test-the-workflow

3. Click on the "Remove Group" workflow and then click on the "Start" button.

Test-the-workflow1

4. After a few minutes the workflow status will be changed to "Completed".
5. If the specified Group Name exists in the site then it will be deleted successfully from the SharePoint site.

Summary

Thus in this article you saw how to remove the group from the SharePoint site using a NINTEX workflow.

Up Next
    Ebook Download
    View all
    Learn
    View all