cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sillmania
Regular Visitor

Collection of all O365 users

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

Re: Collection of all O365 users

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.

View solution in original post

3 REPLIES 3
TopShelf-MSFT Community Champion
Community Champion

Re: Collection of all O365 users

adding in @EvanChakiMSFT to assist

 

@TopShelf-MSFT

Power Apps
Power Apps

Re: Collection of all O365 users

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.

View solution in original post

sillmania
Regular Visitor

Re: Collection of all O365 users

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.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (5,816)