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 / Office365 seach help n...
Power Apps
Unanswered

Office365 seach help needed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey, So for my office.searchusers it searches properly from the start of the name but I would like it if I could search midname -

E.g. instead of typing 'John' to find my colleague "John Doe" I'd like to be able to type "ohn"

I know it sounds like a weird request but it would help me sort out a bigger function that powerapps apparently doesn't handle properly 🙃

EVEN BETTER

If possible I'd like a way to search based on two fields -

Field 1 = "Jo"

Field 2 = "Do"

And it should display "John Doe"

Thanks in advance for attempting to help ^^

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Try this:

    Filter(Office365Users.SearchUser(),"Jo" in DisplayName)

    For example, this formula returns my profile!

    Filter(Office365Users.SearchUser(),"ott" in DisplayName)

     or

    Filter(Office365Users.SearchUser(),"er" in DisplayName)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for getting back to me @Anonymous 

    The filter doesn't work unfortunately because of the quantity of users in my office365 user directory (20k+)

    The Office365Users.SearchUser({searchTerm:Text}) is able to grab the results that start with Text on the first and last name - 

    If Text = Hi, the Office365Users.SearchUser({searchTerm:Text}) will return names such as Hillary Jacobs, Hink May, Bobby Histon and Mark Hithe but it won't return Thillary Jacobs, Shinka Par etc which is what I'm aiming for.

    Know any way to solve this?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry, no. The only solution I could come up with was the one I posted.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you try to use the below expression:
     
    Search(Office365Users.SearchUserV2().value,TextInput1.Text,"DisplayName", "Mail")
     
    You need to add the columns manually where you want to search the results. 
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard