How to Remove User From SharePoint Group Using NINTEX Workflow

Introduction

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

creating a custom list

The SharePoint Group column specifies which group the user is to be removed from and the User Name column specifies the user to be removed from the specified group.

Delete User

The following procedure deletes a user from a group workflow:

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

     Create a Workflow in Nintex Workflow
     
  4. Click on "Cancel".  

    Select a Workflow Template
     
  5. Drag and drop the Call web service action from the Integration section.  

    Call web service
     
  6. You will see the warning symbol in the workflow action, click on that you will see the following warning message. 

     warning symbol in the workflow action
     
  7. Click on "Configure" from the drop down list in the Call web service action.  

    Call web service Configure
  8. Click on the "Insert Reference" button for the URL column and then click on "Common" tab. Select "Web URL" and then click on "Ok".  

    Select Web URL from Insert Reference
  9. Append "/_vti_bin/usergroup.asmx" in the URL column.
  10. Enter the User Name and Password to call the web service and then click on the "Reference" button.
  11. Click on "Ok".

     Web Service URL
     
  12. All the web service methods will be populated. Select the "RemoveUserFromGroup" web method that adds the user to the specified SharePoint group.  

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

    Web Service Input section
     
  14. Click on the "Insert Reference" button for the groupName column and then click on the "Item Properties" tab. Select "SharePoint Group" and then click on "Ok".

    Item Properties tab
     
  15. Click on the "Insert Reference" button for the userName column and then click on the "Item Properties" tab. Select User Name and then click on "Ok".

     Select User Name from item Properties tab
     
  16. Click on "Save".

    Configuration Action

Publish the workflow

Use the following procedure to 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.

    Title and description in workflow
     
  3. Click on the "Submit" button.

    Publishing in workflow
     
  4. The workflow is published successfully.

    published successfully in workflow

Test the workflow

Test the workflow using the following procedure:

  1. Navigate to the User Provisioning list.
  2. Create a new item.

    Test the workflow
     
  3. Select the item and then click on "Workflows" in the ribbon interface.

    Workflows in the ribbon interface
     
  4. Click on "Delete user from group workflow" and then click on the "Start" button.

     Add user to group workflow
     
  5. After a few minutes the workflow status will be changed to Completed.

    workflow status Completed
     
  6. The user is removed successfully from the specified SharePoint group.

Summary

Thus in this article you have seen how to remove a user from the specified SharePoint group using a NINTEX workflow.

Related Links

  1. How to Create Site Using NINTEX Workflow in SharePoint
  2. How to Delete Site Using NINTEX Workflow in SharePoint
  3. How to add user to SharePoint group using NINTEX workflow