Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
Insight · Microsoft 365

Guests who never signed in

A guest who never signed in is an external account that was created in your tenant but has no recorded sign-in. Such accounts keep whatever access they were given (group memberships, shared files, app assignments) without anyone using it, so they are worth reviewing and removing.

Why it matters

Guest accounts let people from outside your organisation reach your Microsoft 365 resources through Microsoft Entra B2B collaboration (Microsoft Learn: B2B collaboration overview). An invitation that was sent but never used still leaves an object in your directory, and that object can already be a member of groups or Teams, or hold access to shared content.

Microsoft recommends reviewing inactive accounts on a regular basis, because accounts nobody uses are easy to overlook and give an attacker a quiet foothold if the external mailbox is ever compromised (Microsoft Learn: Manage inactive user accounts). Fewer dormant guests also means a smaller list for access reviews.

Find it yourself

This script is read-only: it only uses Connect-MgGraph with read scopes and Get-MgUser, and it changes nothing in your tenant. It needs the Microsoft Graph PowerShell SDK (install guide). Reading signInActivity requires the AuditLog.Read.All permission and a Microsoft Entra ID P1 or P2 licence (signInActivity resource type).

Connect-MgGraph -Scopes "User.Read.All","AuditLog.Read.All" -NoWelcome

$guests = Get-MgUser -All -Filter "userType eq 'Guest'" `
  -Property Id,DisplayName,Mail,CreatedDateTime,ExternalUserState,SignInActivity

$guests |
  Where-Object { -not $_.SignInActivity.LastSignInDateTime } |
  Select-Object DisplayName, Mail, CreatedDateTime, ExternalUserState |
  Sort-Object CreatedDateTime |
  Format-Table -AutoSize

Disconnect-MgGraph

Read the result

Each row is a guest with no sign-in timestamp. Read the columns like this:

  • ExternalUserState = PendingAcceptance: the invitation was never redeemed. These are usually the safest to clean up.
  • ExternalUserState = Accepted with no sign-in: the guest redeemed the invitation but nothing is recorded in the sign-in data. Check the guest's group and app access before judging them.
  • An old CreatedDateTime: the longer ago the invitation was created, the weaker the case for keeping the account.

An empty value means no sign-in is recorded in the activity data, so treat it as a lead to verify rather than as proof.

What to do next

  1. Ask the internal sponsor of each guest whether the access is still needed.
  2. Remove guests that are not needed, starting with pending invitations that are old.
  3. For guests you keep, review which groups, Teams and apps they can reach and trim anything unneeded.
  4. Repeat the check on a regular rhythm so dormant guests do not pile up again.

See it continuously

ConfigCobra's Microsoft 365 inventory includes a built-in risk view for guests who never signed in, next to your users, groups and enterprise apps. The relation graph shows how a guest connects to groups and roles, findings link to the inventory objects they concern, and you can export the list as CSV. Scheduled scans (daily, weekly or monthly) or an ad hoc scan keep the view current, and ConfigCobra only reads your tenant, it never changes it.

See it for your whole tenant, continuously

Inventory & Insights lists these risks with built-in views and CSV export, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial