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

Maluenda Miranda, Cristian G 116 Reputation points
2021-08-02T23:15:01.8+00:00

Hi,
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 (https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0).

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.

Regards,
Cristian.

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

Accepted answer
  1. Maluenda Miranda, Cristian G 116 Reputation points
    2021-08-25T20:03:13.703+00:00

    Microsoft fixes this issue, but it doesn't support just the date. It is necessary to include the time.
    Here is an example:

    https://graph.microsoft.com/v1.0/users?$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. PrasF12 1 Reputation point
    2021-08-18T18:48:56.327+00:00

    Please try this, I used your command and modified it a bit. It worked for me.

    https://graph.microsoft.com/v1.0/users?$filter=(createdDateTime ge 2021-07-01T00:00:00Z AND createdDateTime le 2021-08-01T00:00:00Z)&$count=true

    Make sure you're passing the header (ConsistencyLevel) as well.