Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 7infOEfT4AB6ZOZMW7Whpe
Power Apps - Building Power Apps
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2020 09:41:44 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

  • MattiasP1 Profile Picture
    138 on 10 Jan 2023 at 13:59:06
    Re: How to pull list of all office 365 users list in PowerApps?

    Grateful for this. Thanks ! 

  • Adrian_Celis Profile Picture
    1,652 Super User 2025 Season 1 on 25 Oct 2022 at 09:46:11
    Re: How to pull list of all office 365 users list in PowerApps?

    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)

  • nolato Profile Picture
    2 on 25 Oct 2022 at 09:35:16
    Re: How to pull list of all office 365 users list in PowerApps?

    Hi,

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

  • Vijay Tailor Profile Picture
    2,961 on 21 Sep 2020 at 11:37:54
    Re: How to pull list of all office 365 users list in PowerApps?

    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

  • Dave Wi Profile Picture
    on 21 Sep 2020 at 10:35:17
    Re: How to pull list of all office 365 users list in PowerApps?

    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 21 Sep 2020 at 10:14:32
    Re: How to pull list of all office 365 users list in PowerApps?

    Hi Dave,

    you can use formula Like below also.


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

    Hope it will resolve your issue.

    VijayTailor_0-1600683219519.png

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard