Forum Discussion
Flippantboy13
Jun 10, 2022Copper Contributor
Getting last sign-in logs for specific AzureAD group and exporting to excel
Data does appear but an error stops me from getting everything I get this error when I run the script how do I avoid or skip this? Error message: Get-AzureADAuditSignInLogs : Error occurred whi...
- Jun 10, 2022I think you're "flooding", you could add a start-sleep -seconds 1 after ##Get logs filtered by current guest ?
Alan2022
Jun 13, 2022Iron Contributor
Flippantboy13
Never do this inside the loop
$logs = Get-AzureADAuditSignInLogs -Filter "userprincipalname eq `'$($guest.mail)'" -All
It will do a server query each time root cause of the too many request.
$logs + Where-Object is the local filtering.
Never do this inside the loop
$logs = Get-AzureADAuditSignInLogs -Filter "userprincipalname eq `'$($guest.mail)'" -All
It will do a server query each time root cause of the too many request.
$logs + Where-Object is the local filtering.