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 / Search for a user - Fi...
Power Automate
Unanswered

Search for a user - Filtering results

(0) ShareShare
ReportReport
Posted on by 51

I'm wanting to search for users with a Department = "SchoolX"

 

The tenant has over 100 000 users, so getting all users and then putting them in an array doesn't appear to work (i.e. https://powerusers.microsoft.com/t5/Building-Flows/Filter-search-in-O365-Users-Search-for-Users-V2/m-p/1651540#M183508)

 

How else can I filter users based on Department (or any other field)? Easy to do in PowerApps, just can't figure it out in Automate.

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @MrLetts ,

     

    Please turn on this setting and use filter action.

    vxiaochenmsft_0-1676428734889.png

    vxiaochenmsft_1-1676428744758.png

    vxiaochenmsft_2-1676428786249.png

    Or call a http request---

    vxiaochenmsft_3-1676428833130.png

    https://graph.microsoft.com/v1.0/users?$filter=Department eq 'SchoolX'

     

    Best Regards,

    Wearsky

  • MrLetts Profile Picture
    51 on at

    The first option didn't work (threw an error at >5000), however, the http request is perfect!

     

    Thanks!

  • MrLetts Profile Picture
    51 on at

    I spoke a little soon as it is limited to 999 results, but that is still plenty workable when combining filters. Thanks again.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard