Optimize Sign-In Insights with Count in Microsoft Graph
If you build on Microsoft Entra sign-in data, this is a quietly important update. Microsoft Graph now supports $count in sign-in API requests, so your queries can return the total number of matching records alongside the data set you actually need. It sounds minor, but anyone who has built dashboards or detection pipelines on sign-in logs knows how much friction this removes.
What the feature does
The sign-in logs API (/auditLogs/signIns) now honors the OData $count query parameter. With it, a request can return the total count of matching records without you having to page through the entire result set just to know how big it is.
Count works alongside the rest of the OData toolbox — $filter, $select, $orderby, $top, and $expand — so you can shape both the data and its size in a single, intentional request.
Why it matters
- Design dashboards more easily when you can show totals without retrieving every record behind them.
- Make background jobs more efficient by knowing result sizes up front and avoiding unnecessary processing.
- Keep apps lean when they only need selected properties or a filtered slice of sign-in data.
How to enable it
Count support is in Public Preview, so validate your query patterns and result totals before wiring them into production reporting.
- Query
/auditLogs/signInswith$count=true. - Add
$filterto narrow by time range, application, or status. - Use
$selectand$orderbyto trim and sort the payload. - Pair it with
$topor$expandas needed for the specific reporting or investigation scenario.
Where it fits
This is a developer and analytics quality-of-life improvement that pays off across the board. Operational dashboards get accurate totals without expensive full pulls. Detection and reporting jobs can size their work before they start. And any app consuming sign-in data can be more precise about what it asks for. Because count composes with the existing OData parameters, you don’t have to rethink your queries — you just get a more efficient way to express what you already wanted.
Conclusion
If you own Entra analytics, detections, or operational dashboards, this is an easy one to adopt right away. Count-aware queries let you ask for exactly what you need — the right slice of data and its total — in a single request. Test your filters and totals against known data sets, then fold the pattern into your existing pipelines.