Entra Stale Guest Cleanup Log in

Stale guest accounts in Microsoft Entra ID

Facts copied from Microsoft Learn on 2026-12-01. Each row links to its source. Microsoft changes these pages, so check them before you rely on them.

TopicValueDetails
Last sign-in data (signInActivity)Entra ID P1 or P2 + AuditLog.Read.AllMicrosoft Graph returns signInActivity only for directories with a P1 or P2 license and apps granted AuditLog.Read.All. It is not returned by default: you must $select it. Source
Page size when reading sign-in activity500 usersWhen signInActivity is selected or filtered, the maximum $top is 500 (999 otherwise). signInActivity can't be filtered together with other properties such as userType. Source
Last successful sign-inRecorded since December 1, 2023lastSuccessfulSignInDateTime covers interactive and non-interactive sign-ins and was not backfilled. lastSignInDateTime also counts failed attempts. Source
Blank last sign-inNever signed in, or before April 2020lastSignInDateTime is blank if the account was never used for a sign-in attempt or the last attempt was before April 2020. It can take up to 24 hours to update. Source
Built-in inactive guest reviewEntra ID Governance licenseThe inactive guest report and access reviews that block and then delete inactive guests need Microsoft Entra ID Governance or Microsoft Entra Suite licenses. Source
Who is a guest's sponsorThe inviter, by defaultUp to five sponsors (users or groups) can be set when inviting. With none set, the inviter becomes the sponsor. Guests invited through SharePoint sharing get no sponsor (known issue). Source
Least permission to disable a guestUser.EnableDisableAccount.All + User.Read.AllLeast privileged combination to update accountEnabled. Apps also need a higher admin role to change users that hold privileged admin roles. Source
Undo window after deleting a user30 daysDeleted users go to deleted items and can be restored for 30 days, including their group memberships. After that they are deleted permanently. Source
Least permission to restore a deleted userUser.DeleteRestore.AllApplication permission for POST /directory/deletedItems/{id}/restore on users. Source

List guests with their last sign-in

Microsoft Graph PowerShell, as someone who can read users and audit logs (needs Entra ID P1 or P2 for sign-in dates):

Connect-MgGraph -Scopes User.Read.All,AuditLog.Read.All
$cut = (Get-Date).AddDays(-90)
Get-MgUser -All -Filter "userType eq 'Guest'" -Property displayName,mail,createdDateTime,externalUserState,signInActivity |
  Where-Object { -not $_.SignInActivity.LastSuccessfulSignInDateTime -or $_.SignInActivity.LastSuccessfulSignInDateTime -lt $cut } |
  Select-Object DisplayName, Mail, CreatedDateTime, ExternalUserState, @{n='LastSignIn';e={$_.SignInActivity.LastSuccessfulSignInDateTime}}

Guests with externalUserState = PendingAcceptance never redeemed their invitation. Without P1 or P2 this state and the creation date are all you have.

Automate it

Entra Stale Guest Cleanup runs this every day, shows each guest's sponsor and group and app count, asks sponsors once a month whether to keep each guest, and can disable or delete the ones you pick with an undo. Disclosure: we wrote this page and sell the tool.

Start the 14-day trial

Corrections: support@puzaricloud.in. Microsoft Entra is a trademark of Microsoft. This site is not run by Microsoft.