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

Before you start 

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

The steps required to configure the action are given below. The SharePoint Online - Get members of a SharePoint group action fields and settings table describes all the required and optional configuration fields.

  1. Select a SharePoint Online 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.

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

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

  3. 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.

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

Section

Field Description Variable types
(unlabeled)

Connection Credentials and other settings 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