> ## 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.

# Azure Blob Storage connection

> Learn how to configure an Azure Blob Storage connection for Infisical.

An Azure Blob Storage connection authenticates Infisical to an [Azure storage account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview), so Infisical can store [PAM session recordings](https://infisical.com/docs/documentation/platform/pam/sessions/external-storage.md) in a container that you own. The connection uses either a [Microsoft Entra app registration](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) with a client secret, or one of the storage account's [access keys](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage).

Each connection gives access to one storage account. Infisical connects to the storage account at `https://<storage-account-name>.blob.core.windows.net`, so only storage accounts in the Azure public cloud are supported, not Azure Government or Azure China.

> [!NOTE]
>
> This guide only authenticates Infisical with Azure Blob Storage. Once the app connection is ready, you can [use it to set up integrations](#step-3-configure-integrations).

## Prerequisites

* An Azure storage account in the Azure public cloud
* For the Client Secret method, permission to create app registrations in Microsoft Entra ID and the **Owner** or **User Access Administrator** role on the storage account, to assign roles
* For the Access Key method, permission to view the storage account's access keys, such as the **Storage Account Key Operator Service Role**

## Step 1: Give Infisical access to the storage account

Infisical needs credentials that can read, write, and delete blobs in the storage account. Pick the method you'll use in the connection form.

> [tab] Client Secret
>
> With the Client Secret method, Infisical signs in as a Microsoft Entra app registration. The app registration needs two roles:
>
> * **Storage Blob Delegator** on the storage account, to get the key Infisical signs recording links with
> * **Storage Blob Data Contributor** on the container that stores recordings, to write, read and delete recordings
>
> With these roles, the app registration can't read or change the storage account's other containers.
>
> **Step 1**
>
> In the Azure portal, go to **Microsoft Entra ID** > **App registrations** and select **New registration**. Enter a name, such as `infisical-pam-recordings`, and select **Register**.
>
> **Step 2**
>
> On the app registration's **Overview** page, copy the **Application (client) ID** and the **Directory (tenant) ID**.
>
> **Step 3**
>
> Go to **Certificates & secrets** > **Client secrets** and select **New client secret**. Pick an expiry, select **Add**, and copy the secret's **Value**.
>
> Azure only shows the value once. Before the secret expires, create a new one and update the connection's credentials in Infisical.
>
> **Step 4**
>
> Open the storage account, go to **Access control (IAM)**, and select **Add** > **Add role assignment**. Search for **Storage Blob Delegator**, select the role, and select **Next**.
>
> **Step 5**
>
> Select **Select members**, search for the app registration by name, and select it. Then select **Review + assign**.
>
> **Step 6**
>
> In the storage account, go to **Data storage** > **Containers** and open the container that stores recordings. Go to **Access control (IAM)** and select **Add** > **Add role assignment**.
>
> **Step 7**
>
> Search for **Storage Blob Data Contributor**, select the role, and select **Next**. Then select the app registration under **Select members**, and select **Review + assign**.
>
> A new role assignment can take a few minutes to apply. If Infisical can't check the credentials right after you assign the role, wait a few minutes and try again.

> [tab] Access Key
>
> With the Access Key method, Infisical signs in with one of the storage account's access keys, which gives full access to the whole storage account.
>
> **Step 1**
>
> In the Azure portal, open the storage account and go to **Security + networking** > **Access keys**.
>
> **Step 2**
>
> Select **Show** next to the **Key** of `key1` or `key2`, and copy the key.
>
> The Access Key method only works if **Allow storage account key access** is enabled under the storage account's **Settings** > **Configuration**. If your organization turns this setting off, use the Client Secret method.

## Step 2: Create the app connection

Next, create the app connection in Infisical. PAM only uses organization-level connections for session recordings.

**Step 1**

In the sidebar, select **Integrations**, then open the **App Connections** tab.

![App Connections Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/general/add-connection.png)

**Step 2**

Select **Add Connection** and choose **Azure Blob Storage**.

**Step 3**

Select the method you set up in [Step 1](#step-1-give-infisical-access-to-the-storage-account), then fill out the form's fields:

> [tab] Client Secret
>
> * **Name**: A descriptive name for the connection
> * **Description** (optional): A note for future reference
> * **Method**: **Client Secret**
> * **Storage Account Name**: The name of the storage account, which is 3 to 24 lowercase letters and numbers
> * **Tenant ID**: The **Directory (tenant) ID** you copied from the app registration
> * **Client ID**: The **Application (client) ID** you copied from the app registration
> * **Client Secret**: The client secret's **Value** you copied from the app registration

> [tab] Access Key
>
> * **Name**: A descriptive name for the connection
> * **Description** (optional): A note for future reference
> * **Method**: **Access Key**
> * **Storage Account Name**: The name of the storage account, which is 3 to 24 lowercase letters and numbers
> * **Account Key**: The access key you copied from the storage account

Then, select **Connect to Azure Blob Storage**.

When you submit the form, Infisical checks the credentials against the storage account:

* **Client Secret:** Infisical signs in to Microsoft Entra ID and requests a user delegation key from the storage account, which fails if the client secret is wrong or the app registration has no role on the storage account
* **Access Key:** Infisical reads the storage account's information, which fails if the key or the storage account name is wrong

If the check fails, Infisical doesn't save the connection, and the error message says which part failed.

The check doesn't test access to a container. Infisical tests the container when you [select it in a PAM template](https://infisical.com/docs/documentation/platform/pam/sessions/external-storage.md#step-2-configure-the-template).

> [!TIP]
>
> Your Azure Blob Storage app connection is ready to use.

## Step 3: Configure integrations

Now that your Azure Blob Storage app connection is configured, you can use it to set up the following integrations:

> [card] [PAM session recording storage](https://infisical.com/docs/documentation/platform/pam/sessions/external-storage.md)
>
> Store PAM session recordings in a container in your storage account.


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