How to view login history of an organization in Salesforce?

How to view login history of an organization in Salesforce?

Go to Setup –> Administer –> Manage Users –> Login History.

SOQL:

SELECT Id, LoginTime, UserId FROM LoginHistory WHERE LoginTime > 2021-06-23T16:05:00Z AND LoginTime < 2021-06-24T16:05:00Z

SELECT Id, Name, Username FROM User WHERE Id IN ( SELECT UserId FROM LoginHistory WHERE LoginTime > 2021-06-23T16:05:00Z AND LoginTime < 2021-06-24T16:05:00Z )

Leave a Reply