> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Launch your first PAM session

> Connect to a PostgreSQL database through Infisical PAM.

In this quickstart, you add a PostgreSQL database to Infisical PAM, connect to it from your browser, review the recording of what you did, and give your team access to the database. Neither you nor your team ever sees the database password.

## Prerequisites

* The **Product Admin** [role](https://infisical.com/docs/documentation/platform/pam/concepts/access-control.md) in PAM
* A [Gateway](https://infisical.com/docs/documentation/platform/gateways/gateway-deployment.md) that can reach your PostgreSQL database
* The host, port, and database name of the PostgreSQL database, and a username and password for it

## Step 1: Create a folder

A [folder](https://infisical.com/docs/documentation/platform/pam/folders/overview.md) groups the accounts that the same people need to reach.

**Step 1**

Go to **Privileged Access Management** > **Accounts**, select the arrow next to **Add Account**, and select **Add Folder**.

**Step 2**

Enter a name for the folder, such as `platform-team`, and select **Add Folder**.

Infisical gives you the **Admin** role on the folder, so you can add accounts to it.

## Step 2: Add the database

An [account](https://infisical.com/docs/documentation/platform/pam/accounts/overview.md) stores the connection details and credentials for one database or server.

**Step 1**

Select **Add Account**.

**Step 2**

Select the folder you created, select the `postgres` [template](https://infisical.com/docs/documentation/platform/pam/templates/overview.md), and select **Next**.

**Step 3**

Enter a name for the account, such as `orders-db`.

**Step 4**

Select the **Gateway** that can reach the database, and enter the database's host, port, and database name.

**Step 5**

Enter the username and password, and select **Create**.

## Step 3: Connect to the database

**Step 1**

On the **Accounts** page, select the rocket icon on the account's row.

**Step 2**

Select **Browser**, then select **Connect in Browser**.

The database opens in a new browser tab, where you can browse its tables and run SQL queries. Infisical connects as the account's user, so you don't enter a password.

Run a query or two, then close the tab to end the session.

## Step 4: Review the session

**Step 1**

Go to **Privileged Access Management** > **Sessions** and select your session.

**Step 2**

On the **Session Logs** tab, review the queries you ran and the database's responses.

## Step 5: Give your team access

Give your team a role on the folder, so they can connect to the database the same way you did.

> [!NOTE]
>
> Your team members, or a group they belong to, must already be [product members](https://infisical.com/docs/documentation/platform/pam/concepts/access-control.md#product-membership) of PAM.

**Step 1**

On the **Accounts** page, open the folder's options menu, select **Configure**, and open the **Permissions** tab.

**Step 2**

Select **Assign Access**.

**Step 3**

Select your team's group, or a team member, as the **Assignee**, and select **Connector** as the **Role**.

**Step 4**

Select **Assign**.

The Connector role lets your team launch sessions on every account in the folder, including accounts you add later. To let someone add accounts and manage access to the folder, give them the **Admin** role instead.

## Next steps

> [card] [Concepts](https://infisical.com/docs/documentation/platform/pam/concepts/overview.md)
>
> Learn how Infisical PAM controls access to your infrastructure.

> [card] [Access requests](https://infisical.com/docs/documentation/platform/pam/access-requests/overview.md)
>
> Require approval before a member can use a sensitive account.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.