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 / App with office365 con...
Power Apps
Answered

App with office365 connection doesn't show all the requested records.

(1) ShareShare
ReportReport
Posted on by 1,066
Dear Experts,

My app uses a Gallery connected with Office365Users connector.
With a SearchBox, and 2 Comboboxes called JobTitle and Department.

But when i select f.e. a certain department i only get 2 records but i 
know that certain department has 30 members. Why doesn't all the records
being displayed, is my AD which contains 5000 records to large.
Can this be solved?

This my code:
 
Sort(
    Distinct('Office365-gebruikers'.SearchUser({searchTerm: SearchBox.Value;top: 999});
    Department
    );
    Value;
    SortOrder.Ascending
)

Sort(
    Distinct('Office365-gebruikers'.SearchUser({searchTerm: SearchBox.Value;top: 999});
    Department
    );
    Value;
    SortOrder.Ascending
)

The gallery:
If(
    !IsBlank(SearchBox.Value) || 
    !IsBlank(cbAfdeling.Selected.Value) || 
    !IsBlank(cbTitel.Selected.Value);
    Filter(
        'Office365-gebruikers'.SearchUser(
            {
                searchTerm: SearchBox.Value;
                top: 999
            }
        );
         EndsWith(Mail; "@xxx.de");
        (IsBlank(cbAfdeling.Selected.Value) || Department = cbAfdeling.Selected.Value) &&
        (IsBlank(cbTitel.Selected.Value) || JobTitle = cbTitel.Selected.Value)
    )
)
 


Gr. P
Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
    @CU16021406-1, What is your backend used in the application. 
     
    If its sharepoint - create a person or group column and map the column to the combo box items property 
  • CU16021406-1 Profile Picture
    1,066 on at
    What i would like is to use my app with the Office365Users connector.
  • Verified answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Your fundamental issue is that you are applying a filter after the Office365Users.SearchUser function returns the maximum of 999 records. 
     
    Technically you should be able to use skip: with a Sequence function and build a large collection (like below), but it does not work (just does multiple copies of the same first 999)
    Clear(colAllUsers);;
    ForAll(
       Sequence(5);
       Collect(
          colAllUsers;
          Filter(
             Office365Users.SearchUserV2(
                {
                   isSearchTermRequired: false;
                   top: 999;
                   skip: (Value - 1) * 999
                }
             ).value;
             AccountEnabled && EndsWith(Mail; "@xxx.de")
          )
       )
    );
    The only way I am aware of that may be worth trying is using a Flow with a http request to Entra, but this is a premium connector and requires a fairly involved setup.
     
    However, if this suits your model, you may be able to do this directly in the Items of a Combo Box - this should search for the user before the other filters are applied.
    Filter(
       Office365Users.SearchUserV2(
          {
             searchTerm: Self.SearchText;
             top: 999
          }
        ).value;
       AccountEnabled && EndsWith(Mail; "@xxx.de") &&
       (Len(cbAfdeling.Selected.Value) = 0 || Department = cbAfdeling.Selected.Value) &&
       (Len(cbTitel.Selected.Value) = 0 || JobTitle = cbTitel.Selected.Value)
    )
     
     Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog Practical Power Apps    LinkedIn  

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard