[GH-ISSUE #1218] [Feature Request]: Add additional query filters for Sign-in Reports #679

Closed
opened 2026-03-02 12:44:17 +03:00 by kerem · 3 comments
Owner

Originally created by @joeldeteves on GitHub (Nov 14, 2022).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1218

Description of the new feature - must be an in-depth explanation of the feature you want, reasoning why, and the added benefits for MSPs as a whole.

Per the discussion on Discord it would be useful to have additional query filters for the Sign-in Reports.

The reason for this is we have some tenants that exceed the 45 second threshold, which often leads to failure / tmeouts when pulling the reports (while other tenants work fine).

Being able to fine-tune these reports would allow us to get only the data we need without exceeding the timeout. It also provides flexibility in terms of the reporting.

PowerShell commands you would normally use to achieve above request

Get Failed Sign Ins
createdDateTime gt 2022-10-01 and (status/errorCode eq 50126)

Get All Sign Ins Outside Canada
createdDateTime gt 2022-10-01 and (location/countryOrRegion ne 'CA') and (location/countryOrRegion ne '') and (status/errorCode eq 0)

PS Command
New-GraphGetRequest -uri "https://graph.microsoft.com/beta/auditLogs/signIns?api-version=beta&`$filter=$($filters)" -tenantid $TenantFilter -erroraction stop

PS Command using $top
New-GraphGetRequest -uri "https://graph.microsoft.com/beta/auditLogs/signIns?api-version=beta&`$top=10&`$filter=$($filters)" -tenantid $TenantFilter -erroraction stop

Originally created by @joeldeteves on GitHub (Nov 14, 2022). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1218 ### Description of the new feature - must be an in-depth explanation of the feature you want, reasoning why, and the added benefits for MSPs as a whole. Per the discussion on Discord it would be useful to have additional query filters for the Sign-in Reports. The reason for this is we have some tenants that exceed the 45 second threshold, which often leads to failure / tmeouts when pulling the reports (while other tenants work fine). Being able to fine-tune these reports would allow us to get only the data we need without exceeding the timeout. It also provides flexibility in terms of the reporting. ### PowerShell commands you would normally use to achieve above request **Get Failed Sign Ins** ```createdDateTime gt 2022-10-01 and (status/errorCode eq 50126)``` **Get All Sign Ins Outside Canada** ```createdDateTime gt 2022-10-01 and (location/countryOrRegion ne 'CA') and (location/countryOrRegion ne '') and (status/errorCode eq 0)``` **PS Command** ```New-GraphGetRequest -uri "https://graph.microsoft.com/beta/auditLogs/signIns?api-version=beta&`$filter=$($filters)" -tenantid $TenantFilter -erroraction stop``` **PS Command using $top** ```New-GraphGetRequest -uri "https://graph.microsoft.com/beta/auditLogs/signIns?api-version=beta&`$top=10&`$filter=$($filters)" -tenantid $TenantFilter -erroraction stop```
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2022):

Thank you for creating a feature request!
Your current priority is set to "No Priority". No Priority Feature requests automatically get closed in two days if a contributor does not accept the FR.

If you are a sponsor you can request an upgrade of priority. To upgrade the priority type "I would like to upgrade the priority".
If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://cipp.app/docs/dev/. Contributors to the CIPP project reserve the right to close feature requests at will.
If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!".

<!-- gh-comment-id:1314045242 --> @github-actions[bot] commented on GitHub (Nov 14, 2022): Thank you for creating a feature request! Your current priority is set to "No Priority". No Priority Feature requests automatically get closed in two days if a contributor does not accept the FR. If you are a sponsor you can request an upgrade of priority. To upgrade the priority type "I would like to upgrade the priority". If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://cipp.app/docs/dev/. Contributors to the CIPP project reserve the right to close feature requests at will. If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!".
Author
Owner

@github-actions[bot] commented on GitHub (Nov 24, 2022):

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.

<!-- gh-comment-id:1325857034 --> @github-actions[bot] commented on GitHub (Nov 24, 2022): This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.
Author
Owner

@KelvinTegelaar commented on GitHub (Nov 24, 2022):

Custom filters added

<!-- gh-comment-id:1326322272 --> @KelvinTegelaar commented on GitHub (Nov 24, 2022): Custom filters added
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#679
No description provided.