Azure graph API for users doesn't support filter by createdDateTime anymore

Maluenda Miranda, Cristian G 116 Reputation points

We have a job that searches the users created between two dates. It was working fine until the last week. Suddenly, Microsoft decided to not support filters by "createdDateTime" for Users anymore, despite the documentation says it is supported (

Now, our job is broken and I need to find a walkaround to search the users created daily. I am not sure if the delta link will help me, because the job is stateless.


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,112 questions
0 comments No comments
{count} votes

Accepted answer
  1. Maluenda Miranda, Cristian G 116 Reputation points

    Microsoft fixes this issue, but it doesn't support just the date. It is necessary to include the time.
    Here is an example:$filter=(createdDateTime ge 2021-07-01T00:00:00Z AND createdDateTime le 2021-08-01T00:00:00Z)

    It is not necessary to use any advanced query parameters!

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Danstan Onyango 3,816 Reputation points Microsoft Employee

    The filter requires the Advanced Query Options.

    To get it to work you need to add the count operator and the ConsistencyLevel=eventual. Example

    GET$filter=createdDateTime eq 2021-04-06T08:03:07Z&$count=true  
    ConsistencyLevel: eventual  
    1 person found this answer helpful.

  2. Maluenda Miranda, Cristian G 116 Reputation points

    Thanks, Danstan for your answer.
    I tried to use the advance query option, as you suggested, but I got the same error:
    "Unsupported or invalid query filter clause specified for property 'createdDateTime' of resource 'User'."

    Something that I don't understand is, I am using the operators "ge" and "le" and the documentation says those operators are supported by default.

    Summary, my filter "(createdDateTime ge 2021-07-28 AND createdDateTime le 2021-07-29)" doesn't work using the default or advance query parameter.

  3. ssk 1 Reputation point

    Hi @Danstan

    I'm also having the same exact problem even by using the advanced query options.

    Any ideas ?

  4. Maluenda Miranda, Cristian G 116 Reputation points

    This is getting worst!
    I tried to loop over the users and filter them out in my code.
    When we are iterating over all the users using paging (, we get this error:

       status: 414,  
        statusText: 'URI Too Long',  

    In summary, there is not any way to get the users between two dates!



    The problem was I added to the request the query parameter select in each call, and Azure Graph API was appending the same values to the query parameter all the time. So, the URI grew until Azure threw the error.
    I believe this wasn't the behavior before the change, but I can't prove it.

    0 comments No comments