Power Apps Get Office 365 Group Members

As a Power Apps developer, you should know how to get specific Office 365 group members in Power Apps. In this tutorial, I will explain about Power Apps Get Office 365 Group Members using a simple scenario.

Also, I will discuss the Power Apps get SharePoint group members.

Power Apps Get Office 365 Group Members

Normally, when working with Power Apps to get a User’s information from an Office 365 Group, Most people use Microsoft Power Apps Flow.

However, there is also the easiest and trickiest way to get the Microsoft 365 Group Members directly using the Power Apps Office365Groups connector.

I have an Office 365 group named “Database Team,” and This group contains the below members.

Input:

powerapps get sharepoint group members

Now, I would like to get these group members in Power Apps and display them on the gallery control, as shown below.

Output:

get sharepoint group members in powerapps

To work around this, follow the below-mentioned steps. Such as:

1. On the Power Apps app, add data from the Office365Groups connector, as shown below.

office365group members

2. Now, insert a Gallery control and set its Items property to the code below.

Items = Office365Groups.ListGroupMembers("01820dd5-bc21-43a9-964e-70692bf81e5f").value

Where,

  • Office365Groups.ListGroupMembers(“Group ID”) = It helps to get the information about all the users from the specific Office 365 Group
powerapps list group members

3. Suppose you want to get the specific Office 365 group ID; you can easily add it from the last part of the Group URL, as shown below.

powerapps get group members

4. Finally, once your app is ready, Save, Publish, and Preview the app. The gallery displays each member of the specific Office 365 group, as shown below.

powerapps get user group membership

This is how we can work with the Power Apps Get Office 365 Group Members.

Power Apps Get SharePoint Group Members

I have created a SharePoint Online Group named “FinaceTeam” and this group contains the below members.

Refer to the below image:

power apps list group members

Note:

For creating a SharePoint group, I have taken my existing Microsoft 365 group [FinanceTeam] and added it to the SharePoint group.

For creating a SharePoint group, I have taken my existing Microsoft 365 group and added it to the SharePoint group.

Now, I would like to get the SharePoint Group members and save on the Power Apps collection. For that, follow the below steps. Such as:

1. On the Power Apps Screen, insert a Button control and set its OnSelect property to the code below.

OnSelect = ClearCollect(
    colGetSPGroupMembers,
    Office365Groups.ListGroupMembers("50babcf4-d526-4cc6-b899-aa178d542f75").value
)

Where,

  • colGetSPGroupMembers = Power Apps collection name
  • “50babcf4-d526-4cc6-b899-aa178d542f75” = SharePoint Group ID
power apps get sharepoint group members

2. Now, click on the button control to get the SharePoint Group members in the collection. To find the collection, go to the Variables section, Expand the Collections to select a specific collection, and click on the View Table option.

Output.

office365groups.listgroupmembers powerapps

This is how we can get the SharePoint group members in Power Apps.

Additionally, you may also like some articles below:

I trust this Power Apps tutorial is useful. If you have any requirements related to obtaining Office 365 group users in Power Apps, you can follow this post until the end to get an idea of how to achieve them.

  • Thank you Bijay!
    I’m using this now, but getting stuck at the 100 item limit. Any idea how I can combine Top function with the clearcollect so i can get at least 250 users?

    • There is a second parameter you can pass to increase the limit.
      Office365Groups.ListGroupMembers(“group-id-here”,{‘$top’:250}).value

      Limit for the connector is 999

  • So, this article shows user from Office365 group which is added in SharePoint groups for then you can get it. Apparently, there is no way to get user from SharePoint group without using o365 group.

  • I think the group you are pertaining to is not a Sharepoint Group. That is an Office365 Group. Office 365 groups are problematic when assigned permission to a sharepoint site, list, etc.

  • Your article should be altered. Swap out “SharePoint Groups” for “Office 365 Groups”. Your wording isn’t really right in this case.

  • It’s exactly as others have pointed out already: Sharepoint group members cannot be obtained this way, your guide only works for o365 group members. Pls update, so others don’t get confused.

  • Thats great! What about a separate SharePoint permission group created locally on the SharePoint site? How to list the members of that group?

  • Thank you but how do you get over the 999 limit? I guess I should try a filter but what’s the syntax for that? Thanks

  • This article is misleading. In this sample, Office 365 Group membership is displayed not SharePoint Group members.

  • Hi Bijay, Is there any way to read more than 2000 users from office365 user group. I tried {$skip: value, $top:value} in the above function. But, It is not giving the expected results.

  • >