In this Salesforce tutorial, we will learn how to download the login history in Salesforce.
While working with an organization that uses Salesforce, I got a task where I needed to download the login history in Salesforce. To fulfill this requirement I use the login history that is present under the Identity.
So after looking at the multiple solutions, I found a solution that helped me to download the login history in Salesforce Lightning as well as Salesforce Classic, you have come to the right place.
How to download the login history in Salesforce Lightning
Here we are downloading the login history in Salesforce Lightning. We can download the login history of users to Salesforce for the past 6 months. The login history page shows 20,000 records of the user logins. To see more records we can download the information to a CSV and GZIP file.
If you want to learn how to create a login history list view in salesforce lightning follow these steps:
1: Login into your Salesforce lightning account, Go to the gear icon. Under the gear icon, there are two options present first one is Setup and another one is Service Setup. Here we are clicking on the Setup option.

2: After clicking on the setup option, the setup page is open. Enter the login history in the Quick Find Box and the login history come at the top. Click on the login history. And this login history is present under the identity in the left sidebar.

3: After clicking on the Login History option, the login history page is open. We can download the last six months of login history, or filter and show up to 20, 000 records of login history for the last six months. Also, show the approximate location of the IP address from where the user logged in.
Here we can see the download options in two ways we can download the login history. There are two file types the first file type is CSV File and the second file type is GZIP File.
We can first want to download the CSV file (Comma Separated Values), so we can click on the CSV file checkbox and then select all logins file contents, and then click on the download now option to download the CSV file.

4: After clicking on the download now button, the Login history CSV file is downloaded, Click on the downloaded file the file is open and it can give the filter and shows up to 20, 000 records of login history for the last six months.

5: After downloading the CSV file, now we want to download the GZIP file. The GZIP is the short form of GNU Zip and it is the open-source compressed format. It is used for compressing single files.
For downloading the GZIP file simply click on the GZIP File checkbox then select all logins to file contents and after that click on the download now button.

6: After clicking on the download button or GZIP file is downloaded and the downloaded file is shown at the bottom of the browser. Click on the login history file and this login history zip file is open.

7: After clicking on the login history file, the login history .gz file is open and you can see that the compressing single files are shown and it can give the filter and shows up to 20, 000 records of login history for the last six months.

In this way, we understand how to download the login history in Salesforce Lightning. Let’s Proceed further and learn how to download the login history in Salesforce Classic.
How to download the login history in Salesforce Classic
Here we are downloading the login history in Salesforce Classic. If you want to learn how to download the login history in Salesforce Classic follow these steps:
Step-1: First log in to the Salesforce account, when we log in to the account the Salesforce lightning edition is open. Moving to Salesforce Classic, click on the Profile picture. The Profile picture drop-down list is open. Under this profile picture list, there is an option to switch to Salesforce Classic. Click on it.
After clicking on the switch to Salesforce Classic option, click on the drop-down arrow of the username. The drop-down list is open, under this list Setup option is present below the My Profile option. Click on the Setup.

Step-2: After clicking on the setup option, the setup page is open. Enter the login history in the Quick Find Box and the login history come at the top. Click on the login history. And this login history is present under the identity in the left sidebar.

Step-3: After clicking on the Login History option, the login history page is open. We can download the last six months of login history, or filter and show up to 20, 000 records of login history for the last six months. Also, show the approximate location of the IP address from where the user logged in.
Here we can see the download options in two ways we can download the login history. There are two file types the first file type is CSV File and the second file type is GZIP File.
We can first want to download the CSV file (Comma Separated Values), so we can click on the CSV file checkbox and then select all logins file contents, and then click on the download now option to download the CSV file.

Step-4: After clicking on the download now button, the Login history CSV file is downloaded, Click on the downloaded file the file is open and it can give the filter and shows up to 20, 000 records of login history for the last six months.

Step-5: After downloading the CSV file, now we want to download the GZIP file. The GZIP is the short form of GNU Zip and it is the open-source compressed format. It is used for compressing single files.
For downloading the GZIP file simply click on the GZIP File checkbox then select all logins to file contents and after that click on the download now button.

Step-6: After clicking on the download button or GZIP file is downloaded and the downloaded file is shown at the bottom of the browser. Click on the login history file and this login history zip file is open.
After clicking on the login history file, the login history .gz file is open and you can see that the compressing single files are shown and it can give the filter and shows up to 20, 000 records of login history for the last six months.

In this way, we understand how to download the login history in Salesforce Classic.
Conclusion
The login history of users to Salesforce can download for the past 6 months. The login history page shows 20,000 records of the user logins. To see more records we can download the information to a CSV and GZIP file.
I hope you got an idea of downloading the login history in Salesforce. Also, I have explained step by step how to download the login history in Salesforce Lightning and in Salesforce Classic.
You may also like the following related tutorials:
- Create a Login History List View in Salesforce
- Monitor Login History in Salesforce
- Grant Login Access to Support in Salesforce
- Control Login Access Policies in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.