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

Notifications

Announcements

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard