obtain lastlogon in a hybrid

Copper Contributor

I am trying to obtain a lastlogon for my Hybrid AD environment.   My environment consist of 5 sites which each site having a DC.  We synchronize to Azure AD, with ADConnect.  I have found scripts, which will pull from on premise DC but I believe I am missing the information from Azure AD.

 

Is there a strategy or script to pull from all DC and Azure AD so I have a consolidate view on a user's lastlogon?

2 Replies
Will looking at the M365 mailbox login, simplify and meet your criteria instead?

https://o365reports.com/2019/06/18/export-office-365-users-real-last-logon-time-report-csv/

@Luke Murray That is an interest take.  Let me describe the environment a little more why we are pursuing the last logon activity.  We have on premise DC, which users authenticate to plus we have SSO on several application.  Some of these are service accounts which will not update the  LastUserActionTime. 

 

Our assumption is, a user needs to log into the environment to do anything and it should be picked up by DC and/or Azure AD.