Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

InactiveUsersLast90Days.ps1 - limit of 5000 audit log items #80

Open
joeljeffery opened this issue Oct 9, 2020 · 0 comments · May be fixed by #82
Open

InactiveUsersLast90Days.ps1 - limit of 5000 audit log items #80

joeljeffery opened this issue Oct 9, 2020 · 0 comments · May be fixed by #82

Comments

@joeljeffery
Copy link

This script only shows a list of users that have not logged in for 90 days or more if your tenancy happens to have fewer than 5000 matching audit log entries for the following actions over the last 90 days: UserLoggedIn, PasswordLogonInitialAuthUsingPassword, UserLoginFailed.

$loggedOnUsers = Search-UnifiedAuditLog -StartDate $startDate -EndDate $endDate -Operations UserLoggedIn, PasswordLogonInitialAuthUsingPassword, UserLoginFailed -ResultSize 5000

In any reasonably active tenancy, you're going to get mainly false positives.

You need to batch these requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant