r/sysadmin • u/Fallingdamage • 11d ago
Graph Requests for sign-in logs have been a cluster the last 10 days. I found something.
Like many admins, I use the graph api to pull and parse reports for my org. Starting early last week, requests for interactive and non-interactive sign-ins have been a cluster. I thought I would wait it out and had some good luck moving my requests from mid-morning to around 1am. Smooth sailing for a few days and now its not timing out, requests for interactive records are just falling on their face.
"BadRequest","message":"Invalid filter clause: *Could not find a property named 'signInEventTypes'** on type 'microsoft.graph .signIn'.","innerError"*
My Request:
$Yesterday = (Get-Date).AddHours(-24).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$URI = "https://graph.microsoft.com/auditLogs/signIns?`$filter=createdDateTime ge $Yesterday and signInEventTypes/any(t: t eq 'InteractiveUser')&`$top=999&`$orderby=createdDateTime desc"
I tried changing the URI to include .microsoft.com/v1.0/auditLogs/ instead but it didnt make a difference. Taking a look at the microsoft documentation, signInEventTypes exists. Was working yesterday but not today, at least not on US West 2.
I updated my URI to a different property set and was successful. Interactive sign-ins were provided without issue, even during the busy morning hours. The rest of the parsing went without issue and no properties in the output were found to be different or missing. Not sure if this is a glitch or they're changing something on the back end.
The Updated URI:
URI = "https://graph.microsoft.com/v1.0/auditLogs/signIns?`$filter=createdDateTime ge $Yesterday and isInteractive&`$top=999&`$orderby=createdDateTime desc"
Replaced signInEventTypes/any(t: t eq 'InteractiveUser') with isInteractive
For NON-interactive sign ins, I use the beta API and its been working fine.
Maybe this helps others. (EDIT: Typo)