SharePoint Online - Get members of a SharePoint group

Use the SharePoint Online - Get members of a SharePoint group action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. to retrieve details of members in a SharePoint Online group. The member details are stored in the output variables of the action and can be used in other actions of the workflow.

For example, the Emails collection output variable contains the email addresses of all the members of a SharePoint group. You can use this output variable in the Assign a task to multiple users action to send the same task to all the members of this group.

Note: The Assign a task to multiple users action supports only 20 assignees. If the SharePoint group has more than 20 members, the task is sent only to the first 20 email addresses in the Emails collection variable.

For more information about the SharePoint Online connector, go to SharePoint Online.

Example: Send a task to all the members of a SharePoint Online list

  1. Add the Get members of a SharePoint group to the workflow.

  2. Configure the action and create a variable named the SharePoint List Details in the Result field to store the result of the action.

  3. Add the Assign a task to multiple users action to your workflow.

  4. In the Assignees configuration field, click + Insert to add a variable.

  5. In the Insert variables panel, select the SharePoint Online category and click the SharePoint List Details variable you created in the Get members of a SharePoint group action.

  6. Hover over the Emails collection and click Insert.

    The Emails collection that you retrieved from the Get members of a SharePoint group action is added to the Assignees field.

Configure the SharePoint Online - Get members of a SharePoint group action

Important: Before inserting variables in the action configuration, you must manually type or select the values and populate other dependent fields in order to retrieve the output data. Once configured, you can insert variables to the required fields.

  1. Open the action configuration panel. For more information, see Add an action to the workflow.

  2. Select a Connection. If you do not have a connection, see Add a connection.
    Note: 

    Only the connections created with the List and libraries authentication method will be available in the drop-down list. For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.

  1. Specify the SharePoint site URL and click Retrieve groups.

    Example: https://domain.sharepoint.com/sites/hr

  2. Select the Group name.
    Important: 

    The groups that are displayed depend on the permissions of the SharePoint Online user used for the connection. You may see an error if the connection used doesn't have full permission. If you see this error, you must create a connection with a user that has full control to the SharePoint site, and ensure the following:

    • The Nintex Automation Cloud - SharePoint Online connector has been given the AllSites.FullControl permission.

    • The credentials of the connection used by the SharePoint Online - Get members of a SharePoint group action has AllSites.FullControl permission granted.

SharePoint Online - Get members of a SharePoint group action fields and settings

Section

Field Description Variable types
(unlabeled)

Connection Credentials and other settings that enables workflows to communicate with external systems, services, or applications. It's required to pass data between the workflow and the indicated service, which could be a cloud service, business application, or content store.

SharePoint Online connection for the SharePoint Online site that you want to access.

To refresh the available connections , click .

(n/a)
Source list

SharePoint site URL

The URL of the SharePoint Online site that has the group you want.

Example: https://domain.sharepoint.com/sites/hr

Boolean, Collection, DateTime, Decimal, Integer, Text

  Retrieve groups Retrieves the groups from the SharePoint site and displays the list in the Group name drop-down list. (n/a)
 

Group name

The name of the group from which you want to retrieve members details.

Important: The groups that are displayed depend on the permissions of the SharePoint Online user used for the connection. You may see an error if the connection used doesn't have full permission. If you see this error, you must create a connection with a user that has full control to the SharePoint site.

Boolean, Collection, DateTime, Decimal, Integer, Text

Output Result

Stores the result of the action in an object with variables that can be used in other actions in the workflow. Contains the following variables:

  • Members: Collection variable that contains variables to store member details.
  • Emails: Collection variable to store the email addresses of group members.

Tip: You can use the Emails collection variable in the Assign a task to multiple users action to send a task to all members of the SharePoint group.

Object