web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to retrieve more t...
Power Apps
Suggested Answer

How to retrieve more than 999 users from the AZ using Office365Groups.ListGroupMembers connector?

(1) ShareShare
ReportReport
Posted on by 39
As per topic?
 
Any call to a group with less than 100 users works as a charm. However when I try to use a sort of pagination (remember this is about Canvas app not Power Automate) in a style like below, somehow the collection ends up with 300 users! When I change sequence to (11) I end up with exactly 1100 users. This seems impossible as the group contains only 1096 users. 
Cheers
 
// Loop to fetch members in batches of 500

ForAll(
    Sequence(3), // 3 batches needed for 1096 members
    Collect(
        Users,
        Office365Groups.ListGroupMembers("xxxxxxae-xxxx-xxxx-xxxx-xxxxxxxxxxxx", { Top: 500, Skip: (Value - 1) * 500 }).value
    )
);
 
Categories:
I have the same question (0)
  • IAmIntractable Profile Picture
    280 on at
    You may have to embed a flow and call the Graph API to get more data. Seems like all the built-in features try to limit results.
  • Tomasz Kasinski Profile Picture
    39 on at
    Sorry for a confusion. I should have add - how to do this in Canvas apps only without flows and graph calls. So the answer is "not possible" ?
  • timl Profile Picture
    36,411 Super User 2025 Season 2 on at
     
    If you use the technique that's shown in the documentation, does that make a difference (ie, to parse the $skipToken value from the @odata.nextLink)?
     
     
  • Suggested answer
    DavidZoon Profile Picture
    738 Most Valuable Professional on at
    The easiest way is to use an embeded flow, trying to use pagination in power apps directly will first of all be very complex to set up and moreover, the loading time of the collections will be longer than via a flow
     
     
  • Tomasz Kasinski Profile Picture
    39 on at
    timl (sorry the {at} interface does not pick your name :(
    I tried that early on and it seems broken as no matter how many pages I will paginate it always only return the first page almost as the $skiptoken is a dead command. Top works fine even some weird combination of Top:100 Skip:100 + 100*value seems to do something only to realise the first 100 users are returned per EACH page meaning I end up with the collection of the same 100 users replicated as many times as there are pages.
  • Tomasz Kasinski Profile Picture
    39 on at
    For the sake of clarity I used the simplest approach and the below code does return 999 users as expected:
     
    Collect(
            Users,
            Office365Groups.ListGroupMembers("xxxx-xx-xx-xxxx-xx", {'$top':(999)}).value
     
    Problem the documentation does not contains information about additional properties or switches (Office 365 Groups - Connectors | Microsoft Learn). I bet I am missing something.
  • timl Profile Picture
    36,411 Super User 2025 Season 2 on at
     
    Thanks for the update 
     
    With regards to the ListGroupMembers method, there doesn't appear to be any another properties or switches apart from $top. The Intellisense in the designer also doesn't suggest anything other than $top.
     
    It's unfortunate that the $skiptoken method didn't work for you. At this point, perhaps you might consider raising a support ticket? If this method doesn't work as documented in the official MS Learn documentation, I would hope that MS fixes this or finds you a suitable workaround.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard