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:
Now, I would like to get these group members in Power Apps and display them on the gallery control, as shown below.
Output:
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.
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
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.
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.
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:
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
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.
This is how we can get the SharePoint group members in Power Apps.
Additionally, you may also like some articles below:
- 4 Various Power Apps Mod Function Examples
- Power Apps Naming Conventions
- 5 Easiest Ways To Download File From SharePoint Document Library in Power Apps
- 13 Various Power Apps Choices Function Examples
- Power Apps Toggle Control
- 8 Various Power Apps Sum Column Examples
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.
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com
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.
Right
If I create a new group, the group ID is not shown.
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.
Yes you are right ,do you know how to get Sharepoint group members in powerapps?
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.
Is there a way to add to the powerapp an option to export to excel
Thank you for this article
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.