Oct 12 2022 08:10 AM
So I need to be able to report on all guest accounts on my companies tenant, to see the last time they logged on. AzureADSignin Logs are no good as they only cover last 30 days, I know somewhere within Azure, I have found one guest account where the last login was during 2021, but I need to capture this for all guest accounts?
Is this even possible?
Thanks in advance for any help.
Oct 12 2022 09:58 AM
SolutionOct 14 2022 04:32 AM
Jun 27 2023 06:03 AM
@coxygt You can easily find the last logon details of a guest users using a single cmdlet 'Get-MgUser'.
Get-MgUser -All -Filter "UserType eq 'Guest'" -Property SignInActivity | Select-Object userprincipalname -ExpandProperty SignInActivity | Format-List
For additional information about guest users management, check: https://m365scripts.com/microsoft365/a-quick-approach-to-manage-guest-users-in-microsoft-365-using-p...
Oct 12 2022 09:58 AM
Solution