cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
Impactful Individual
Impactful Individual

How to pull list of all office 365 users list in PowerApps?

Hello,

 

I want to display list of all office 365 users in dropdown list by default.

 

I have tried, following formula, but it only displays the list of user having "John" character, how can I by default pull list of all Office 365 user?

 

Office365Users.SearchUser({searchTerm:"John"}).Mail

 

How can I achieve that?

 

Thanks

6 REPLIES 6
VijayTailor
Resident Rockstar
Resident Rockstar

Hi Dave,

you can use formula Like below also.


Filter(Office365Users.SearchUser(), OfficeLocation <>Blank())

Hope it will resolve your issue.

VijayTailor_0-1600683219519.png

 

dave8
Impactful Individual
Impactful Individual

Hi @VijayTailor 

 

This still doesn't shows all users as it only shows based on search criteria. I require to have list of all default O365 users which could be more than 10K+ users considering that canvas app has 2000 records limitations to fetch.

 

Thanks,

 

 

 

 

 

 

Hi,
Hope this below solution help you to resolve your issue.

This is the Code Used for that - 
Filter(Office365Users.SearchUser({searchTerm:TextInput3.Text, top:999}), OfficeLocation <>Blank())

VijayTailor_1-1600688239245.png

 



Please Find the below link for Demo.


https://drive.google.com/file/d/1QeM2qp9qTWGFqSuTMb7_OHYbneAjF8yz/view

Hi,

what formula you're using for title to display properly the username?

Adrian_Celis
Super User
Super User

Hi @dave8 

You can try this formula:

 

//Collect All Users
ClearCollect(collAllUsers,
Office365Users.SearchUserV2({isSearchTermRequired:false}).value);

 

But regarding limit, yes it will only get up to the delegation limit (2K) or maybe 999 because of Office365 connector limit. You can have a workaround to add more than 2k to your collection but it will put a load on your app and I do not recommend it.

My previous employer has more than 10k employees. What we did is we created a dataflow (Power Automate flow works too) to get all Office 365 users and then put all data into a Sharepoint list. Then it updates on schedule.

Please see @max81 's solution for using Power Automate to get more than 2k.
Solved: Get the list of all Office 365 Departments & Count... - Power Platform Community (microsoft....

Grateful for this. Thanks ! 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,335)