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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Office 365 Users - Search for users - partial email search not working

(0) ShareShare
ReportReport
Posted on by 4

I am attempting to use the Office 365 Users - Search for users to search for users with a specific domain. For example, I want all users with email addresses that end with @email.org

 

When I search on a complete email it returns just fine. When I do a partial search on a name such as David, no problem, returns all expected users. When I do a partial search on a term like mith (S is purposefully removed) it will return all Smith's in our system. But when I try a partial email it returns nothing.

 

Is there a way to have Office 365 Users - Search for users successfully search on partial email addresses?

 

Thank you!

 

Grant

I have the same question (0)
  • v-bacao-msft Profile Picture
    on at
    Re: Office 365 Users - Search for users - partial email search not working

    Hi @Hyggins,

     

    You could use Search for users to get all the user information, and then use Filter array to get all the user information of the Email address containing the specified domain.

    Image reference:

    31.PNG32.PNG

     

    Best Regards,

    Barry

  • Hyggins Profile Picture
    4 on at
    Re: Office 365 Users - Search for users - partial email search not working

    Hello @v-bacao-msft,

     

    Thank you so much for this reply and example! Unfortunately, this will not work in my case. We have well over 1000 users and the Search for users throws an error if I go over 999. So I was trying to find out how to use the search action itself to limit the output to below 1000.

     

    Currently, using a method very similar to the one you posted, the Search it pulls the first 999 users. Of those users about 230 make it through the @email.org filtering process. This only gets me about half way through first names that begin with J.

     

    I was hoping there would be some other options with the Search for user action.

     

    Thanks again for your post!

  • Lam01007 Profile Picture
    231 on at
    Re: Office 365 Users - Search for users - partial email search not working

    hi @Hyggins ,

     

    Any solution did you found?

     

    Thanks!

  • sudharsan1985 Profile Picture
    1,325 on at
    Re: Office 365 Users - Search for users - partial email search not working

    Hi @Hyggins 

    You can try using the Graph API to fetch the list of users using ODATA filters. Please try to look into the below link

    https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http

     

    Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue

    -Sudharsan K...

  • Hyggins Profile Picture
    4 on at
    Re: Office 365 Users - Search for users - partial email search not working

    Unfortunately this doesn't not seem to be supported at this time.

     

    From Microsoft: https://docs.microsoft.com/en-us/graph/query-parameters#filter-parameter

     

    "The contains string operator is currently not supported on any Microsoft Graph resources."

     

    Thank you!

  • Lam01007 Profile Picture
    231 on at
    Re: Office 365 Users - Search for users - partial email search not working

    hi @Hyggins ,

     

    Finally, I got a solution by using "Search for Users (V2)" action

     

    Click the "..." on the right hand corner of the Action, then turn on "Pagination" and enter Threshold, e.g. 5000

    page.png

     

    then you will get the search result over 999 items (if you have)

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard