How to get SharePoint group through Nintex workflow and add users to the group

  • 22 June 2021
  • 4 replies
  • 611 views

Badge +5

Dear Team,

I have to query the SharePoint group (not person or group column within the list ) and add users and grant permissions to that group through workflow.

 

Regards,


4 replies

Userlevel 3
Badge +12
Hi
Not sure what is your exact requirement, easy way is to create a list with Title and SP Group Name (single line text) columns. Fill the Title column with some identifier, and fill the SP Group name in "SP Group Name" column. Use Query List action to query this list filter by TItle column and get the "SP Group Name" column.
Otherwise, build a Dictionary variable with key/value pair and read the group name based on key value.
Having list is easy to maintain, with dictionary variable, you have to update the workflow for any changes.
Title SP Group Name
Visitors Visitors Group
Members Members Group
Approvers Approvers Group
Owners Owners Group Name
Badge +5

Hi,


How to add user to SharePoint group through workflow as every time the user list gets changed on item creation.


I have created this group Project Team manually. 



Regards,


 

Userlevel 3
Badge +12

If you are using Nintex for SharePoint on-premise, there is no action to add a user to SharePoint group, "Add user to a AD group" allows you to add to AD, not to SharePoint group.


But you can try using web service action (works for 2013, 2016 and 2019), here is the link


If you are using Nitex for SharePoint Online, you can use action, "Office 365 Add User to Group" action. 

Badge +5

Hi,


This works for the fields within the list not SharePoint groups created at site level.


Regards,

Reply