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.
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
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:
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:
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional