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 / Collection of all O365...
Power Apps
Answered

Collection of all O365 users

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I've searched and searched but still haven't quite found what I'm looking for.

 

I have built a corporate directory app based upon the Org Browser template. It works great, but one of the requirements from management is that we be able to enter a department name as a search term and return all people who work in that department.

 

However, that is not possible using the Office365Users.SearchUser() function. 

 

My next thought was to create a collection of all O365 users that is periodically updated so that I could use the search function and include the department in the search criteria.  In other posts I saw that one could use the Azure AD connector's AzureAD.GetGroupMembers() function to get a collection of all users. This worked well, except for one big problem: apparently department is not one of the properties returned by the function, so it's useless for my purposes.

 

Has anyone successfully created a collection of all O365 users for a rather large (5000+) tenant? It seems like you could do it with Office365Users.SearchUser() but I'm not quite sure how to configure the search to narrow down blocks of users. My intention would be to run several ClearCollect routines concurrently (or consecutively) to pull batches of users into the collection since we have a large tenant.

 

Thanks in advance for any insights!

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    adding in @EvanChakiMSFT to assist

     

    @Anonymous

  • Verified answer
    EvanChakiMSFT Profile Picture
    Microsoft Employee on at

    You might need to put all of your organization into a table and query that.  You could use a Flow to sync the data to a table of your choice and then query that in your app.

  • sillmania Profile Picture
    2 on at

    Hi, sorry I had a hard time getting back to you on this. Thank you very much, I didn't consider using Flow but I will definitely research this path.  Thanks again for your response.

  • CVannest Profile Picture
    150 on at

    Hi Sillmania,

    Were you able to create the flow to pull your large tenant into a list in SharePoint?  I attempted to do it and use a Filter Array to weed out disabled accounts and accounts with no JobTitle but kept getting all Active Account results even if JobTitle was empty.

     

    If you were able to do that part, were you able to create a collection using that in your Employee Directory?  I have 10,000+ users in my tenant and have the same ask and issues you were having in your original post.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard