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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Groups.ListGr...
Power Apps
Unanswered

Office365Groups.ListGroupMembers - large group to be added into App Onstart Collection

(0) ShareShare
ReportReport
Posted on by 7
 
I have a piece of code which resides in the App OnStart.  It should collect a list of users within a group utilising the skip token to achieve paging of data.  It should grab 100 x 100 records which it does, however, it is 100 lots of the same data.  The skip token seems to be ignored.  I cannot see why this does not work.
 
Set(gblInstalledTeamsID,#Guid#);
Clear(AllUsers);
ForAll(
    Sequence(100),
    With(
        Office365Groups.ListGroupMembers(gblInstalledTeamsID,
            {
                '$skiptoken': Last(AllUsers).SKIP_TOKEN
            }
        ) As _user,
        With(
            {_skipToken: Last(Split(_user.'@odata.nextLink', "=")).Value},
            Collect(AllUsers, AddColumns(_user.value, SKIP_TOKEN, _skipToken));
        )
    )
);
 
This is a filtered result of the top two collection entries showing the varied token:
 
Test (xTRUST)
RFNwdAoAAQAAAAAAAAAAFAAAAMGLf-o-hHJJsDz52XoUemIBAAAAAAAAAAAAAAAAAAAXMS4yLjg0MC4xMTM1NTYuMS40LjIzMzEGAAAAAAABtTn_TX7CIE6Q7shZvEfhVwEwAAAAAQAAAAA
Test (x TRUST)
RFNwdAoAAQAAAAAAAAAAFAAAAH-lf6s9lKZBsdCx9yAAWA4BAAAAAAAAAAAAAAAAAAAXMS4yLjg0MC4xMTM1NTYuMS40LjIzMzEGAAAAAAABtTn_TX7CIE6Q7shZvEfhVwEwAAAAAQAAAAA
 
 
The below script works for list groups, so I need to know why the above script does not work for list group members.
Clear(col_groups1);
ForAll(
    Sequence(3),
    With(
        Office365Groups.ListGroups(
            {
                '$skiptoken': Last(col_groups1).SKIP_TOKEN
            }) As _user,
        With(
            {_skipToken: Last(Split(_user.'@odata.nextLink', "=")).Value},
            Collect(col_groups1, AddColumns(_user.value, SKIP_TOKEN, _skipToken));
        )
    )
);
Categories:
I have the same question (3)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard