Microsoft Graph API filter

Brass Contributor

I use  $filter query parameter to retrieve the users in  Department 'external' as :$filter=Department eq 'external'


but when I want to retrieve all the users in all Department except 'external' as :$filter=Department ne 'external' .

I got the error below :

    "error": {
        "code": "Request_UnsupportedQuery",
        "message": "Unsupported property filter clause operator 'NotEqualsMatch'.",
        "innerError": {
            "date": "2022-05-31T19:42:21",
            "request-id": "c1132cf4-d5f7-44b5-90dd-c8404f7cc9e9",
            "client-request-id": "167a524c-ac57-5dcb-d0f3-ef1db5eff8f2"



5 Replies
Using "ne" constitutes an "advanced query":
So you need to use the ConsistencyLevel=eventual header and $count=true operator:$filter=Department+ne+'external'&$count=true

I got the same error.


@Vasil Michev 

Did you set the header value?





how to use the filter to grab the members of AZ group?$filter= group members 





@Vasil Michev 

I found that the result is not correct :(