AAD get-azureaduser get lastlogin time

Arif Usman 421 Reputation points
2020-11-02T16:14:11.43+00:00

folks,

i don't see last login time attributes in get-azureaduser. I am trying to create simple query

get-azureaduser -all $true | Where-Object {$_.AccountEnabled -eq 'True' } |Select GivenName , Surname,mail

but couldn't find lastlogin time. need you guys expertise here...

thanks

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,665 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 96,076 Reputation points MVP
    2020-11-02T16:22:40.797+00:00

    There's simply no such attribute mate. The only way to see something like "last login time" currently is to crawl the audit logs: https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/concept-sign-ins

    1 person found this answer helpful.
    0 comments No comments

  2. Arif Usman 421 Reputation points
    2020-11-02T18:01:24.667+00:00

    it is so weird that ms doesn't has this. report won't give granular way then you can create with Powershell.

    0 comments No comments