Skip to main content

Notifications

Community site session details

Community site session details

Session Id : IgI/PXQstav4QGh8rSLb/7
Power Automate - Using Connectors
Unanswered

Search term in Search for Users v2 returns no values

Like (0) ShareShare
ReportReport
Posted on 31 Jan 2024 13:47:54 by

Dear all,

 

I'm trying to extract the list of users in my M365 Entra.

I'm using for that the Search for user connector which works out of the box fine.

 

Now I want to reduce the search to a specific domain to avoid typically getting external users in my list.

I therefore used the search term option of the connector.

 

Screenshot 2024-01-31 at 14.45.01.png

 

However when adding such condition, I do not get any users back anymore 😞

I tried asking copilot to build it for me but it does the same simply with example.com instead of my own domain.

 

Any idea why it does not work?

Many thanks in advance for your advises.


David

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on 01 Feb 2024 at 08:52:56
    Re: Search term in Search for Users v2 returns no values

    Hi @Kazevil 

     

    One solution is to use graph API to filter the mail of users based on the domain. You need to use "Send an HTTP request" action under "Office 365 users" connector to perform filer operation. Here is the example.

     

    In this example I am filtering the users with "@gmail.com" as domain:

    ManishSolanki_0-1706777221423.png

    URI:

    https://graph.microsoft.com/v1.0/users?$select=*&$count=true&ConsistencyLevel=eventual&$filter=endsWith(mail,'@gmail.com')

     pls replace the actual domain in the above URI.

     

     

    Output:

    ManishSolanki_1-1706777489567.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,776 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard

Featured topics

Loading started