Cloudek.Request a service session

Microsoft Entra

Find stale accounts in Entra ID, read-only, with the portal and Graph Explorer

A read-only walkthrough for finding stale accounts and inactive guests in Microsoft Entra ID with the admin centre and Graph Explorer, with licence notes.

Sources checked: 22 November 2026. Every Microsoft statement below comes from the Microsoft Learn pages listed at the end. This is a planning and review guide. It does not inspect your tenant, and licence requirements and portal labels can change, so confirm them against the linked pages.

Accounts outlive the people and projects they were made for. A leaver whose account was never closed, a contractor's guest invite from two years ago, a mailbox user nobody can name: each is an extra way in that nobody is watching. Microsoft says these obsolete accounts represent a security risk, and also notes there is no built-in report for inactive user accounts. You build one from the last sign-in date.

Here is how to do that in about half an hour, using only read access, the Microsoft Entra admin centre and Graph Explorer.

Short answer

Add the last sign-in column to the Users list and filter for dates before your cut-off. For a longer list or a repeatable query, use Graph Explorer with GET requests that read the signInActivity property. For guests, add the ID Governance inactive guest report if you are licensed for it. Then review the list with people who know the accounts. Do not delete from it.

Before you start

  • Licence. Microsoft's inactive-user guidance says reading lastSuccessfulSignInDateTime through Microsoft Graph needs a Microsoft Entra ID P1 or P2 licence.
  • Role. For the portal steps, Microsoft says Reports Reader is the least privileged role needed to access the activity logs.
  • Graph permissions. Listing users with signInActivity needs the AuditLog.Read.All permission, plus a user-read permission such as User.Read.All. Both are read permissions.
  • Pick your cut-off. Microsoft says what "for a while" means is for you to define, and that a reasonable window for many organisations is between 90 and 180 days. People go on leave, so choose the window before you look at the list.

Step 1: the portal view

  1. Sign in to the Microsoft Entra admin centre as at least a Reports Reader.
  2. Browse to Entra ID > Users.
  3. Select Manage view, then Edit columns, then + Add column, choose Last interactive sign-in time, and Save.
  4. Select Add filter for that column, choose the <= operator and a date. The list now shows accounts whose last sign-in was before that date.

Two cautions from Microsoft. The value can take up to 24 hours to update, and the value may be blank if the account has never attempted a sign-in or its last attempt was before April 2020. A blank is therefore a reason to look, not proof of anything.

Step 2: the same data in Graph Explorer

Graph Explorer is Microsoft's browser tool for trying Microsoft Graph requests. Microsoft warns that if you sign in with an organisational account, running a write request can affect the tenant. So keep the method set to GET and do not change it. When a query reports missing permissions, select Modify permissions and consent to AuditLog.Read.All and User.Read.All only.

Query 1: everyone, with their sign-in dates.

GET https://graph.microsoft.com/v1.0/users?$select=displayName,userPrincipalName,signInActivity

Microsoft says that when signInActivity is selected, a page holds at most 500 users, so follow the @odata.nextLink value for the next page. This is also the query to use to find blanks.

Query 2: users whose last successful sign-in is before a date. Ninety days before the date this guide was checked is 24 August 2026, so:

GET https://graph.microsoft.com/v1.0/users?$filter=signInActivity/lastSuccessfulSignInDateTime le 2026-08-24T00:00:00Z

Microsoft documents this form, and also the same filter on lastSignInDateTime. Swap in your own date. The response lists the users but, Microsoft says, not their sign-in activity: to see the dates for one person, query them by name, for example GET https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Alex')&$select=displayName,signInActivity.

Three details decide how you read the answer:

  • lastSignInDateTime is the last interactive sign-in attempt, successful or not. Microsoft says that because failed attempts count, it may not reflect real usage.
  • lastSuccessfulSignInDateTime is the last successful interactive or non-interactive sign-in, but only from 1 December 2023: Microsoft says the data is not backfilled. A blank there does not mean the account was never used.
  • lastNonInteractiveSignInDateTime matters for accounts used through clients rather than by a person at a prompt. Microsoft suggests using it with lastSignInDateTime to identify inactive users.

One limit to know: Microsoft says signInActivity supports filtering but not together with other filterable properties. So you cannot ask for "guests inactive since August" in one filter. Query separately and combine the results yourself.

Step 3: guests, in three queries

Guests are users too, so the steps above include them. These queries narrow the view.

GET https://graph.microsoft.com/v1.0/users?$filter=userType eq 'Guest'&$select=displayName,mail,createdDateTime,externalUserState,signInActivity

This lists the guests with their creation date, invitation state and sign-in dates. Microsoft documents userType as Member or Guest, filterable with eq. Microsoft's pages do not say whether selecting signInActivity is allowed alongside a userType filter, so if Graph rejects it, drop signInActivity from the $select and look guests up individually.

GET https://graph.microsoft.com/v1.0/users?$filter=externalUserState eq 'PendingAcceptance'&$select=displayName,mail,createdDateTime,externalUserStateChangeDateTime

This finds invitations nobody accepted. Microsoft says externalUserState is set for guests invited through the invitation API, with values PendingAcceptance or Accepted, and is null for other users. Guests created another way may not show here.

For a report without writing queries, go to ID Governance > Dashboard, find the Guest access governance card and select View inactive guests. Microsoft says it uses 90 days of inactivity by default (changeable with Edit inactivity threshold), counts days from the creation date for guests who never signed in, refreshes once a day and can be downloaded. It needs Microsoft Entra ID Governance or Microsoft Entra Suite licences, so on Entra ID P1 alone the Graph queries are your route.

Step 4: decide with people, not with a script

Microsoft's guidance is to ask three questions of each inactive user: is the person still employed, do they still need access to what they can reach, and is the account needed for another reason. Add two practical ones. Is this a shared, service or emergency access account that rarely signs in by design? And is the sign-in date misleading because failed attempts, possibly an attacker's, keep refreshing it?

When you do act, Microsoft's access review pattern for stale guests is to block sign-in for 30 days and then remove the user, and it says a deleted guest can be restored for up to 30 days, after which a new invitation is needed. Access reviews for inactive guests need Entra ID Governance or the Entra Suite. Any change is made by a named person in Microsoft's own tools; nothing in this guide changes a tenant.

The steps in one table

Where to look and what each step needs, from Microsoft Learn pages read on 22 November 2026.
StepWhereLicence note from Microsoft
Last sign-in column and filterEntra ID > Users > Manage viewLast sign-in details need Entra ID P1 or P2
All users with sign-in datesGraph Explorer, GET /v1.0/users?$select=...signInActivityAuditLog.Read.All plus a user-read permission; Entra ID P1 or P2
Users inactive since a dateGraph Explorer, $filter=signInActivity/lastSuccessfulSignInDateTime le ...Same; cannot combine with other filters
Guests and pending invitationsGraph Explorer, userType and externalUserState filtersUser-read permission
Inactive guest reportID Governance > Dashboard > Guest access governanceEntra ID Governance or Entra Suite

See it in 30 seconds, without signing up

OpsPilot is Cloudek's read-only Microsoft 365 review workspace. Two of its sixteen Live read-only reviews cover this ground: a Stale accounts review (enabled accounts that have not signed in for months) and an Identity security review (which looks at idle and guest accounts, among other things). Each finding comes in plain English with the evidence behind it, reviews are graded A to F, and when a check needs a licence you do not have, the result says "Not checked: needs" that licence instead of passing.

The interactive demo opens in your browser: nothing to install, no tenant connected, sample data only. The design is read-only: OpsPilot reads and reports, never changes your tenant, and never reads email, files or chat content. Results describe what Microsoft returned on the day they ran and are not an audit or a certification.

Customer access is an invitation-only free trial: 30 days, one organisation of up to 250 users, read-only. To ask for an invitation, email info@cloudekhosting.com. You do not need to send any tenant data to start the conversation. You can also read the OpsPilot overview.

Frequently asked questions

Is a blank last sign-in date proof that an account was never used?

No. Microsoft says the interactive value can be blank if the last attempt was before April 2020 or the account never attempted a sign-in, and that lastSuccessfulSignInDateTime is not backfilled from before 1 December 2023.

Do I need a paid licence to find inactive users?

For the sign-in activity data through Microsoft Graph, Microsoft says you need Entra ID P1 or P2. The inactive guest report and access reviews for inactive guests need Entra ID Governance or the Entra Suite.

Can I run these queries without changing anything?

Yes, if you use only GET requests and consent only to read permissions. Graph Explorer can also run write requests when signed in with an organisational account, so check the method before you press Run.

How long should an account be inactive before I review it?

Microsoft says a reasonable window for many organisations is 90 to 180 days, and that you must allow for legitimate reasons such as leave. Pick the figure before you look at the list.

Does OpsPilot change anything in our tenant?

No. The reviews are read-only. OpsPilot reads and reports, and a named person makes any change in Microsoft's tools.

Sources

OPSPILOT • READ-ONLY MICROSOFT 365 REVIEWS

See what OpsPilot reviews in your tenant

  • WHAT IT DOES: Runs fixed, read-only checks of a Microsoft 365 tenant (identity, licences, email authentication, admin changes and more) and grades the results. It changes nothing in the tenant. Some capabilities are still in development; each page says which.
  • DATA HANDLING: You sign in with Microsoft and approve read-only access. Read the product pages to see exactly what is and is not read.

Was this helpful?