How can I get information on Entra users last logon?

Cameron Summers 5 Reputation points
2026-06-15T14:44:35.38+00:00

How can I get information on Entra users last logon to the system in order to look for older user accounts that should be reviewed?

  • I want to reduce dormant user accounts
  • reduce active users and re-issue licenses
  • back up users data before fully removing them from the Entra
Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Sridevi Machavarapu 33,740 Reputation points Microsoft External Staff Moderator
    2026-06-15T16:17:36.2766667+00:00

    Hello Cameron Summers,

    You can use the Sign-in Activity information in Microsoft Entra ID to identify inactive accounts.

    In the Microsoft Entra admin center, go to Users > All users, add the Last interactive sign-in and Last non-interactive sign-in columns, and then sort or filter by date to find accounts that have not been used recently.

    User's image

    You can also retrieve this information using Microsoft Graph PowerShell:

    Connect-MgGraph -Scopes "User.Read.All","AuditLog.Read.All"
    Get-MgUser -All -Property DisplayName,UserPrincipalName,SignInActivity |
    Select-Object DisplayName,UserPrincipalName,
    @{Name="LastSignIn";Expression={$_.SignInActivity.LastSignInDateTime}}
    

    Before removing any accounts, it is a good practice to verify they are no longer required, back up any necessary data, and remove or reassign licenses as needed. Service accounts should be reviewed separately, as they may not have regular user sign-in activity.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.