I am trying to get a list of all distribution lists using MS Graph API and an HTTP request from a flow. I have the following query which works correctly
$filter=mailEnabled eq true and securityEnabled eq false&$count=true&$top=999
However, when I try to filter out Microsoft 365 groups I get an Unsupported Query error. This occurs when I use the following filter query
$filter=not groupTypes/any(c:c eq 'Unified') and mailEnabled eq true and securityEnabled eq false&$count=true&$top=999
If I remove the NOT the query executes correctly. Is the NOT operator unsupported?
If so, is there any recommendation for how to bring all results within the Flow and parse out those that have Unified as the groupType?
Solved! Go to Solution.
Hi @admiralman,
add the header ConsistencyLevel and set its value to eventual.
After that the query
https://graph.microsoft.com/v1.0/groups?$count=true&$filter=not groupTypes/any(g:g+eq+'unified')
works fine for me.
See https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-beta#properties
Hi @admiralman,
add the header ConsistencyLevel and set its value to eventual.
After that the query
https://graph.microsoft.com/v1.0/groups?$count=true&$filter=not groupTypes/any(g:g+eq+'unified')
works fine for me.
See https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-beta#properties
In the HTTP Request in Flow...I had to change ConsistencyLevel to consistencylevel and it started working.
Great! I guess you forget to do something...
Not really...I didn't realize that the HTTP request option is case sensitive for that header.
No I mean another thing - did I answer your question?
I figured it out myself yesterday but your answer was correct. Accepted your's as solution.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
21 | |
21 | |
9 | |
8 | |
7 |
User | Count |
---|---|
33 | |
31 | |
24 | |
21 | |
11 |