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 / Office365Users.SearchU...
Power Apps
Unanswered

Office365Users.SearchUser() unable to query more than 1000 records in AzureAD

(0) ShareShare
ReportReport
Posted on by 195

Hi,

 

I have a Powerapp, where I need to populate the approver dropdown with JobTitle "Director" and Department "Sales".

 

I have these details being maintained in AzureAD as well as SharePoint userprofiles. I used the below formula in Items property of the approver dropdown.

 

Filter(Office365Users.SearchUser(),JobTitle="Director"&&Department="Sales").DisplayName

 

However the approver dropdown returns empty. If i tweak the above formula and just specify the Department, it returns  8 users successfully.

 

Filter(Office365Users.SearchUser(),Department="Sales").DisplayName

 

I have an admin access, hence shouldn't be an access issue. I explored somewhere that Office365Users can only query 1000 records at a time. My AzureAD has 2500+ records and hence might be the issue. Any inputs on tackling this would be helpful.

 

Categories:
I have the same question (0)
  • Kumar9024021 Profile Picture
    195 on at

    Hi @RezaDorrani ,

     

    I am unable to query 2500 records in AzureAD to filter by Jobtitle and department. I set the approver dropdown Items property to below

     

    Filter(Office365Users.SearchUser(),JobTitle="Director"&&Department="Sales").DisplayName

     

    Any technical advice would be helpful. Thanks.

     

     

  • v-yutliu-msft Profile Picture
    on at

    Hi @Kumar9024021 ,

    Do you want to use Office365Users.SearchUser()  function to search 2500 records in PowerApps?

    I'm afraid it's not supported in PowerApps currently.

    The 999 is the maximum value of user records retrieved from Office365Users.SearchUser() function at once.

    Here's a similar issue for your reference:

    https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Office365-users-show-all-users-from-department/td-p/147922

    As an alternative solution, you could consider take a try to pre-load your user records in batches (in batches <900). Please check and see if the following blog would help in your scenario:

     

     

     

  • Kumar9024021 Profile Picture
    195 on at

    Hi @v-yutliu-msft 

     

    When i click on the below link, i get access denied message

     

    https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Office365-users-show-all-users-from-department/td-p/147922

     

    If I use Azure AD connector, will I face the same issue still of 999 records ?

    Access Denied.PNG

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard