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
Hi Dave,
you can use formula Like below also.
Filter(Office365Users.SearchUser(), OfficeLocation <>Blank())
Hope it will resolve your issue.
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())
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?
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 !
User | Count |
---|---|
255 | |
114 | |
95 | |
48 | |
38 |