Graph List Users API Filters

Copper Contributor



I am using this API to list the users -


I am trying to filter the users using the display name.$filter=startswith(displayName,'Annexus')


I tried to use multiple filters together but got an error -$filter=startswith(displayName,'AskAthene')&$filter=startswit...


    "error": {
        "message""Query option '$filter' was specified more than once, but it must be specified at most once.",
        "innerError": {
Is it possible to use multiple values for one filter or do I have to call this API separately for each value I need to filter for ?
I need to get all users where display name is in the given list. So, I need to use all names in the list for the filter together.
Is this possible ?
2 Replies
The error is because you're adding multiple $filter operators. Simply adjust the filter query within a single $filter operator. Refer to the official documentation if you need examples on how to build more complex filter queries:
In the documentation, there is no example that uses multiple filters.

I am still trying to understand dhow we can use multiple filters with the same function - startsWith and use multiple values to match.