question

deeku avatar image
0 Votes"
deeku asked ShivamDhiman-1582 commented

Filter sign-in logs based on createdDateTime ?

I want to get all the sign-in logs whose createdDateTime is greater than input date.

I am using below query but date time ge filter is not working, I still get records which createdDateTime is "2022-05-19T06:49:52Z"


          https://graph.microsoft.com/beta/auditLogs/signIns?$filter=appId eq '1b730954-1231-4b72-9bfd-dac224a7b123'&createdDateTime ge '2022-05-20T08:49:47Z'


Am I doing anything wrong?


microsoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShivamDhiman-1582 avatar image
0 Votes"
ShivamDhiman-1582 answered ShivamDhiman-1582 commented

Hi @kudlatiger

While adding multiple filters clause you need to use 'and'.
I used the same filter clause which you have used after replacing the '&' with 'and' and got desired result.
Please use the below query

 https://graph.microsoft.com/beta/auditLogs/signIns?$filter=appId eq '1b730954-1231-4b72-9bfd-dac224a7b123' and createdDateTime ge 2022-05-20T08:49:47Z

Result:
204684-multiplefilter1.png


Hope this helps.

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".


multiplefilter1.png (107.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @kudlatiger

Can you please provide update on this issue?

If the above provided answer is helpful to you, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

0 Votes 0 ·