# View Database Access History

- This feature is not available for `M0` free clusters, `M2`, and `M5` clusters. To learn more, see Atlas M0 (Free Cluster), M2, and M5 Limits.

- This feature is not supported on Serverless instances at this time. To learn more, see Serverless Instance Limitations.

## Overview

Atlas parses the MongoDB database logs to collect a list of authentication requests made against your clusters through the following methods:

- `mongosh`

- Compass

- Drivers

Authentication requests made with API Keys through the Atlas Administration API are not logged.

Atlas logs the following information for each authentication request within the last 7 days:

<table>
<tr>
<th id="Field">
Field

</th>
<th id="Description">
Description

</th>
</tr>
<tr>
<td headers="Field">
Timestamp

</td>
<td headers="Description">
The date and time of the authentication request.

</td>
</tr>
<tr>
<td headers="Field">
Username

</td>
<td headers="Description">
The username associated with the database user who made the authentication request.

For LDAP usernames, the UI displays the resolved LDAP name. Hover over the name to see the full LDAP username.

</td>
</tr>
<tr>
<td headers="Field">
IP Address

</td>
<td headers="Description">
The IP address of the machine that sent the authentication request.

</td>
</tr>
<tr>
<td headers="Field">
Host

</td>
<td headers="Description">
The target server that processed the authentication request.

</td>
</tr>
<tr>
<td headers="Field">
Authentication Source

</td>
<td headers="Description">
The database that the authentication request was made against. `admin` is the authentication source for SCRAM-SHA users and `$external` for LDAP users.

</td>
</tr>
<tr>
<td headers="Field">
Authentication Result

</td>
<td headers="Description">
The success or failure of the authentication request. A reason code is displayed for the failed authentication requests.

</td>
</tr>
</table>Authentication requests are pre-sorted by descending timestamp with 25 entries per page.

### Logging Limitations

If a cluster experiences an activity spike and generates an extremely large quantity of log messages, Atlas may stop collecting and storing new logs for a period of time.

Log analysis rate limits apply only to the Performance Advisor UI, the Query Insights UI, the Access Tracking UI, and the Atlas Search Query Analytics UI. Downloadable log files are always complete.

If authentication requests occur during a period when logs are not collected, they will not appear in the database access history.

## Required Access

To view database access history, you must have `Project Owner` or `Organization Owner` access to Atlas.

## Procedure

<Tabs>

<Tab name="Atlas CLI">

To return the access logs for a cluster using the Atlas CLI, run the following command:

```sh

atlas accessLogs list [options]

```

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas accessLogs list.

- Install the Atlas CLI

- Connect to the Atlas CLI

</Tab>

<Tab name="Atlas Administration API">

To view the database access history using the API, see Access Tracking.

</Tab>

<Tab name="Atlas UI">

Use the following procedure to view your database access history using the Atlas UI:

### Navigate to the Clusters page for your project.

- If it is not already displayed, select the organization that contains your desired project from the  Organizations menu in the navigation bar.

- If it is not already displayed, select your desired project from the Projects menu in the navigation bar.

- If the Clusters page is not already displayed, click Database in the sidebar.

### View the cluster's database access history.

- On the cluster card, click .

- Select View Database Access History.

or

- Click the cluster name.

- Click .

- Select View Database Access History.

</Tab>

</Tabs>