AAD get-azureaduser get lastlogin time

Arif Usman 496 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 Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
    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 496 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

Your answer

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