[SalesForce] How to query all the Historical data of LoginHistory object

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…

Best Answer

LoginHistory track only for six months.

https://developer.salesforce.com/docs/atlas.en-us.workbook_security.meta/workbook_security/audit_controls_1.htm

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.

Related Topic