cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admiralman
Helper I
Helper I

Microsoft Graph HTTP Unsupported Query

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?

1 ACCEPTED SOLUTION

Accepted Solutions
VictorIvanidze
Resident Rockstar
Resident Rockstar

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

 



Freelance Power Automate developer. $50 per hour.

View solution in original post

6 REPLIES 6
VictorIvanidze
Resident Rockstar
Resident Rockstar

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

 



Freelance Power Automate developer. $50 per hour.

View solution in original post

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



Freelance Power Automate developer. $50 per hour.
admiralman
Helper I
Helper I

Not really...I didn't realize that the HTTP request option is case sensitive for that header.

VictorIvanidze
Resident Rockstar
Resident Rockstar

No I mean another thing - did I answer your question?



Freelance Power Automate developer. $50 per hour.
admiralman
Helper I
Helper I

I figured it out myself yesterday but your answer was correct. Accepted your's as solution.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (947)