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 / How to pull list of al...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi Dave,

    you can use formula Like below also.


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

    Hope it will resolve your issue.

    VijayTailor_0-1600683219519.png

     

  • Dave Wi Profile Picture
    on at

    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,

     

     

     

     

     

     

  • Vijay Tailor Profile Picture
    2,961 on at

    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

  • nolato Profile Picture
    2 on at

    Hi,

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

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    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.com)

  • MattiasP1 Profile Picture
    138 on at

    Grateful for this. Thanks ! 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard