How to Add User to SharePoint Group Using NINTEX Workflow

In this article you will see how to add a user to a SharePoint group using a NINTEX workflow.

Introduction

In this article you will see how to add a user to a SharePoint group using the NINTEX workflow. We will be adding the user to 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 is used to specify to which group the user must be added and the User Name column is used to specify the user to be added to the specified group.

Creation

The following explains how to create the site creation 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 can 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 to 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 AddUserToGroup web method that will be used to add 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 the 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 the User Name and then click on Ok.

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

    Configuration Action

Publish the workflow

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

    Publish the workflow
     

  2. Ensure 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

  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 Add user to 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 added successfully to the specified SharePoint group.

Summary

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

Related Links:

  1. How to Create Site Using NINTEX Workflow in SharePoint
  2. How to Delete Site Using NINTEX Workflow in SharePoin

Up Next
    Ebook Download
    View all
    Learn
    View all