Hi Aditya,
Using this tool, you can generate Office 365 User Last Logon time report(Exchange\SharePoint\OneDrive\Yammer\Skype\Azure AD). Also you can Export Office 365 User Last login time to CSV or other file formats.
https://gallery.technet.microsoft.com/Export-Office-365-User-d0a3122d
On the SFB on-premise server,if you have the Monitoring Server role configured in your environment,you could use following SQL to find user last logon time,for example,I want to find user test1 last logon time,we could use his sip uri (test1@contoso,com)
to find it.
USE LcsCDR
SELECT dbo.Users.UserUri, dbo.UserStatistics.LastLogInTime
FROM dbo.UserStatistics
JOIN dbo.Users ON dbo.Users.UserId = dbo.UserStatistics.UserId
where dbo.Users.UserUri='test1@contoso.com'
The following link is for your reference
https://blogs.technet.microsoft.com/dodeitte/2011/05/11/how-to-get-the-last-time-a-user-registered-with-a-front-end/
Best Regards,
Leon-Lu
TechNet Community Support
Please remember to
mark the replies as answers if they help and
unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com