cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Responsive Resident
Responsive Resident

Office365Groups connector can only display max 100 members

I am using the Office365Groups.ListGroupMembers(GroupID).value function and it is only able to display 100 results.

Same issue when I do a ClearCollect.

My group has 141 members currently. 

 

Anyone know a workaround of this?

12 REPLIES 12
Pstork1
Dual Super User III
Dual Super User III

Unfortunately, Its not as simple as just listing all 7,000 users in the group and letting a user pick.  But it can be done using a slightly different design.  It is a pretty complex undertaking, but it is possible.

 

The way I would do it is to use a Searchable Combo Box and the Office 365 Users connector to find the specific user.  You can setup the combo box to be searchable on a variety of properties in the user object. I would suggest DisplayName, Surname, and Mail.  Those three should cover the scenarios you've described.  Once you have the specific User's details you can use the Graph API to check their group membership.  This is the hard part.  Microsoft hasn't introduced an easy way to invoke the Graph API yet from either Power Apps or Power Automate.  So you'll have to build a custom connector.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

So I did find another way to do it that doesn't use the Graph API.  The one issue is that the user running the app needs to be an admin.  Unfortunately, group membership isn't something that a regular user can view.  You need to be an admin or the owner of the group...  But here is the process.

 

1) Create a Combo Box to search for the specific user you want.  Set the ComboBox Properties like this

'Items' = Office365Users.SearchUser({searchTerm:ComboBox1.SearchText, top:999})
'Search Fields' = ["DisplayName","Mail","Surname"]
'SelectMultiple' = false

That will let you type in the beginning of a first name, last name, or email address and find the user.

2) Add a second Combo Box to pick the group you want to check.  Set the properties as follows

'Items' = Office365Groups.ListOwnedGroupsV3().value
'Search Fields' = ["id"]
'SelectMultiple' = false

3) Set the OnSelect for both Combo Boxes to the following

If(IsEmpty(
         AzureAD.CheckMemberGroups(ComboBox1.Selected.UserPrincipalName,Table({Value:ComboBox2.Selected.id}))
         ), 
   UpdateContext({groupMember:"False"}),
  UpdateContext({groupMember:"True"})
  )

Now if you select a user from the First Combo Box and a Group from the Second the context variable will be set to True if they are a member.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hey @Pstork1 ,

 

thank you so much for providing those two approaches. I think I have to try the custom connector way, because I have to share the app externally to our tenant so that our support staff can use the app for our customer. I will first try your first suggestion. I heared that we will need some kind of power apps licenses due to custom connectors are only available with a license.

 

If this is no solution I will try the second approach and our staff has to login to an environment where the are workin with their admin-account with the correct role assigned.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (20,430)