cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jnelsoncpath
Helper I
Helper I

"Top" not working for 100 record limit on AzureAd.getgroupmembers

I have an app that gathers employee contact information for our Communications department and exports it to a CSV file for later use.  The app works fine, but the data is not accurate.

I have a collection that is gathering group members.  There are 112 members in my group and I need them all to return.  I'm using the following code to retrieve them and I am limited at 100 records.

 

ClearCollect(colEmployees, AzureAD.GetGroupMembers("ccxxxxxx-xxxx-xxxx-bf23-xxxxxxxxxx").value) = 100 records only

 

I did the reading and see there is a 100 record limit on this function and the office365users.searchuser() function also.  Adding a "top" number is supposed to allow for more records to be returned but it doesn't work in PowerApps.  

 

ClearCollect(colEmployees, AzureAD.GetGroupMembers("ccxxxxxxx-dxxx-xxxa-bf23-xxxxxxxxxx").value, {top:999}) = 101 records.  Only 1 more returned.  Why?  I can change the top value to any number I want (10, 7, 100, 99, 999, 1000) and I still get 101 records back. 

 

How do I get all of my records returned?

 

Thank you,

 

James

7 REPLIES 7
Priscilla
New Member

Hi, did you eventually manage to solve this ? as I'm having th same exact issue

Hello. No I haven't solved this yet.  I had to put the project down but will be picking it back up and making noise about this again soon.

anymore updates on this one?

 

is there another way I can get a good list of all employees in our company?

No I've unfortunately not found a solution to this yet.

how crazy - can someone suggest another way to get a list of all users?

 

I guess for now I need to dump our userlist into a DB table

Pri
New Member

Managed to sort it out like this:

 

ClearCollect(_colUsers,AzureAD.GetGroupMembers("xxxxx", {'$top':999}).value)

sele-02
Regular Visitor

Hi you were in the right track, try the below formula it works for me.

 

ClearCollect(colEmployees, AzureAD.GetGroupMembers("ccxxxxxxx-dxxx-xxxa-bf23-xxxxxxxxxx", {'$top':999}).value)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,075)