web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Users SearchU...
Power Apps
Answered

Office365Users SearchUserV2 Filter options

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone.

 

I recently build a People Picker for my organization since I needed to have a searchable combobox, where on select it shows the picture + telephone number + email for the selected person.

 

The problem however, is that I have no clue on where to find documentation for populating the combobox with only employees, and not service accounts, meeting rooms etc.

 

I am using the following expression for my Items in the combobox: Office365Users.SearchUserV2({top:500}).value

 

Is there any way to customize the expression so for example only user accounts with the "Zip or Postal code" filled out in Contact info are displayed in the search?

 

Any help is greatly appreciated.

Categories:
I have the same question (1)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Consider the following for your app:

       Filter(Office365Users.SearchUserV2({top:500}).value, !IsBlank(PostalCode))

     

    This will filter out any account that does not have a postal code.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much for this! Exactly what I was looking for. Did not for one second think to put the Filter around the function. You sir, is a lifesaver 🙂

  • Lu_Mo Profile Picture
    25 on at

    Problem here is that top:500 will be applied BEFORE the filter, in case there are more than 500 entries, those will not be taken in consideration.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Lu_Mo 

    Yes, in that particular formula, it is restricted to the top 500.  If that parameter is not specified, then the top 1000 is the default.

  • Lu_Mo Profile Picture
    25 on at

    Hi! Our company has ten thousands of entries... What I will do is to check in UserVoice if there is already an entry or I will create one: to be able to delegate a filter expression in Office365Users.SearchUser.

  • Lu_Mo Profile Picture
    25 on at
  • mariagiugno Profile Picture
    23 on at

    Hi @RandyHayes,

     

    Do you know how I would filter by CompanyName or the Distribution List for that Company to display the emails in a dropdown?
    This is what I have so far:

     

     

     

    Distinct(Filter(Office365Users.SearchUserV2({searchTerm:COMP_designer.SearchText}),Mail),
    AccountEnabled, CompanyName = "Company Name"

     

     

    Thanks for your assistance! 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
Vish WR Profile Picture

Vish WR 482

#3
WarrenBelz Profile Picture

WarrenBelz 384 Most Valuable Professional

Last 30 days Overall leaderboard