Skip to content

Get Guest User Sign in Logs in Microsoft 365

Do you need to check whether a guest user has signed in, or review a guest user’s sign-in history? In this guide, you’ll learn how to get the sign-in logs for guest users in Microsoft 365.

Check Guest User Logon history with Entra Admin Center

Section titled “Check Guest User Logon history with Entra Admin Center”
  1. Sign into the Entra Admin Center

  2. Click on Monitoring & health > Sign-in logs

    365 sign in logs

  3. You will need to add a filter to display only guest users.

    Click Add filter select User Type and then Guest. Click Apply to activate the filter.

    add sign in filter

  4. You should now have a list of guest users and their sign in history.

    Note: You can adjust the date range by clicking the date range button.

    view guest user sign in

Get Guest User Sign-in Logs with PowerShell.

Section titled “Get Guest User Sign-in Logs with PowerShell.”
  1. Install Microsoft Graph Beta
Terminal window
Install-Module Microsoft.Graph.Beta
  1. Connect to Microsoft Graph
Terminal window
Connect-MgGraph -Scopes AuditLog.Read.All
  1. Run the following command.
Terminal window
Get-MgBetaAuditLogSignIn -Filter "UserType eq 'Guest'" | Format-Table CreatedDateTime, UserPrincipalName, AppDisplayName, ResourceDisplayName

Example

guest sign in logs powershell

  1. To export the report to csv run this command. Change c:\myfolder\ to a path on your local computer.
Terminal window
Get-MgBetaAuditLogSignIn -Filter "UserType eq 'Guest'" | Format-Table CreatedDateTime, UserPrincipalName, AppDisplayName, ResourceDisplayName | Export-Csv -Path c:\myfolder\guestusers.csv -NoTypeInformation