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 Automate / How to use Search for ...
Power Automate
Answered

How to use Search for Users

(0) ShareShare
ReportReport
Posted on by 21

I am trying to apply a change to managers in my azure AD using flow. 
I am trying to use the Search for Users to find anyone with an email ending in a certain domain. Since we have a few and this would filter the people I need to update with the assign manager part.

 

But if I search on the domain, I get zero results. Can this part be used like this? Or do I have to know the email before hand? 

I tried leaving the field blank and this returns all users. But it seems to only go to 100 users and then fails.  

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @TonyB ,

     

    As far as I know, the domain of the users in the same tenant should be the same, it seems that it cannot be used as a filter.

    But if you want to filter the output of search for user, please try the following methods:

    22.PNG

    Note the case of the domain here.

     

    Best Regards,

  • TonyB Profile Picture
    21 on at

    Thanks I will give that a shot.

  • TonyB Profile Picture
    21 on at

    Unfortunately this throws the following error.

     

    InvalidTemplate. The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['Mail'], 'thedataschool')' failed: 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @TonyB ,

     

    Please try to replace Email to User Principal Name.

     

    Best Regards,

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard