Requirement isto track the Login History data from the date SF Instance is Created.

When tried querying with the below query, The result which was fetching only 2015 login History where the instance got registered in 2013

SELECT id, ApiType, APIVersion, Application, AuthenticationServiceId, Browser, ClientVersion, LoginGeoId, LoginTime, LoginType, LoginUrl, Platform, SourceIp, Status, UserId FROM LoginHistory

I would like to fetch all the data from 2013 to Till date .

Help Me!!! Thank you...

  • Thank you Ratan, Any idea whether Salesforce permits to access entire data if we raise a case with them? Nov 25, 2015 at 11:36

1 Answer 1


LoginHistory track only for six months.


Login history is an important way of tracking who logs into your organization. It allows you to see where users log in from, when they log in, and how they log in. Because of the volume of data, login history is automatically removed after six months. If you want to keep it longer, such as for compliance regulations, consider using one of the Salesforce Web services APIs to copy the history records to a custom object or external data store.

You may need to use any custom object for maintain the LoginHistory Data.

  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes
    – Himanshu
    Nov 25, 2015 at 12:01
  • Thanks @Himanshu. If I missed something feel free to edit my ans.
    – Ratan Paul
    Nov 25, 2015 at 12:38
  • looking good now :)
    – Himanshu
    Nov 25, 2015 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .