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.
| Topic | Value | Details |
|---|---|---|
| Last sign-in data (signInActivity) | Entra ID P1 or P2 + AuditLog.Read.All | Microsoft 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 activity | 500 users | When 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-in | Recorded since December 1, 2023 | lastSuccessfulSignInDateTime covers interactive and non-interactive sign-ins and was not backfilled. lastSignInDateTime also counts failed attempts. Source |
| Blank last sign-in | Never signed in, or before April 2020 | lastSignInDateTime 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 review | Entra ID Governance license | The 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 sponsor | The inviter, by default | Up 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 guest | User.EnableDisableAccount.All + User.Read.All | Least 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 user | 30 days | Deleted 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 user | User.DeleteRestore.All | Application 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.
Corrections: support@puzaricloud.in. Microsoft Entra is a trademark of Microsoft. This site is not run by Microsoft.