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

# Connecting to Azure Blob

> Set up a PlayFab Data Connection to Azure Blob Storage using a SAS token to export PlayStream and telemetry events as Parquet files for downstream analytics.

# Configuring your Azure Storage Data Connection

First, you need an Azure subscription and a storage account.

For existing PlayFab and Azure customers, you can create a storage container on the [Azure portal](https://ms.portal.azure.com/#allservices) and get started with Data Connections on [PlayFab](https://developer.playfab.com/en-US/sign-up).

For existing PlayFab who are new to Azure, you can sign up for an [Azure subscription](https://ms.portal.azure.com/).

<Note>
  Make sure to create your Storage Account in the West US 2, otherwise, egress cost will be applied to your storage account. You can configure up to three Azure Blob Storage accounts in the WestUS2 region.
</Note>

## Setting up your Storage in Azure

For PlayFab to ingest data in your storage account, container details along with authorization using a SAS token are required. To create a SAS token using the Microsoft Azure portal, use the following steps.

<Note>
  A storage account with a restricted network isn't supported. You must allow all networks in the firewall.
</Note>

### Option 1: Create the SAS token on the container level.

<Info>
  Generate and retrieve the shared access signature for your container, not for the storage account itself.
</Info>

* In the [Azure portal](https://ms.portal.azure.com/#allservices), select **Your storage account > Containers**.
* Select a container from the list.
* Go to the right of the main window and select the three ellipses associated with your chosen container.
* Select **Generate SAS** from the dropdown menu to open the **Generate SAS** window.

<img src="https://mintcdn.com/microsoft-4404708b/IwSYTY5BEqd_x-HK/images/playfab/data-analytics/export-data/SAS-token-on-the-container-level-1.png?fit=max&auto=format&n=IwSYTY5BEqd_x-HK&q=85&s=d722515666e9df12047babf8dab019b5" alt="Screenshot of SAS token on the container level - Option 1" width="624" height="263" data-path="images/playfab/data-analytics/export-data/SAS-token-on-the-container-level-1.png" />

* Define **Permissions** by selecting or clearing the appropriate checkbox. Make sure the **Create** and **Write** permissions are selected.

<img src="https://mintcdn.com/microsoft-4404708b/IwSYTY5BEqd_x-HK/images/playfab/data-analytics/export-data/Generate-SAS-token-level.png?fit=max&auto=format&n=IwSYTY5BEqd_x-HK&q=85&s=fb8540c909cfc933987ca52ddbea07ae" alt="Screenshot of Generate SAS token - Option 1" width="422" height="568" data-path="images/playfab/data-analytics/export-data/Generate-SAS-token-level.png" />

* Specify the signed key **Start** and **Expiry** times.
* Select **Generate SAS token and URL**.
* The **Blob SAS token** query string appears in the lower area of the window.
* Copy and paste the **Blob SAS token** values into a **secure location for use in the PlayFab Data Connections**. It's displayed only once and can't be retrieved after the window is closed.

### Option 2: Create the SAS token at the account level

<Info>
  Generate and retrieve the shared access signature for your storage account.
</Info>

* In the [Azure portal](https://ms.portal.azure.com/#allservices), select **Your storage account**
* Select **Shared access signature** from the list under **Security + Networking**.
* Define **Services** by selecting **blob** and clearing other checkboxes.
* Define **Resource Type** by selecting **Container** and **Object** (clear other checkboxes).
* Make sure the **Create**, **Write**, and **List** permissions are selected.
* Specify the signed key **Start** and **Expiry** times.
* Select **Generate SAS token and URL**.
* The Blob SAS token query string appears in the lower area of the window.
* Copy and paste the **Blob SAS token** values into a **secure location for use in the PlayFab Data Connections**. It's displayed only once and can't be retrieved after the window is closed.

<img src="https://mintcdn.com/microsoft-4404708b/IwSYTY5BEqd_x-HK/images/playfab/data-analytics/export-data/SAS-token-on-the-account-level.png?fit=max&auto=format&n=IwSYTY5BEqd_x-HK&q=85&s=a9daa8e1ac2412a074c0b875a1a707b4" alt="Screenshot of SAS token on the account level - Option 2" width="2522" height="1432" data-path="images/playfab/data-analytics/export-data/SAS-token-on-the-account-level.png" />

## Create an Azure Blob Data Connection in PlayFab

### Step 1: Navigate to the Data Connections tab

<img src="https://mintcdn.com/microsoft-4404708b/IwSYTY5BEqd_x-HK/images/playfab/data-analytics/export-data/navigate-to-data-connections-tab.png?fit=max&auto=format&n=IwSYTY5BEqd_x-HK&q=85&s=a6a1ae52f205f7b84499d2448ec91e46" alt="Screenshot of PlayFab data connections tab" width="1317" height="586" data-path="images/playfab/data-analytics/export-data/navigate-to-data-connections-tab.png" />

* Login to PlayFab and navigate to your title.
* Select the **Data** section in the left-hand menu.
* Select the **Data Connections** tab.

### Step 2: Configure a new Data Connection

* Select **New Connection**.
* Choose **Azure Blob Storage** as the **Destination Type**.
* Enter the following values for each field:

| Value          | Details                                                                                                                                    |
| :------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
| Name           | The friendly name of your data connection. This name allows you to find the data connection later to edit it. Put a descriptive name here. |
| Account name   | The Azure Storage Account.                                                                                                                 |
| Container name | The Azure Storage Account Container.                                                                                                       |
| Sas token      | Either the SAS token generated by the container, or the Blob SAS token query string.                                                       |

<img src="https://mintcdn.com/microsoft-4404708b/IwSYTY5BEqd_x-HK/images/playfab/data-analytics/export-data/configure-new-data-connection-blob.PNG?fit=max&auto=format&n=IwSYTY5BEqd_x-HK&q=85&s=4adeac2ea2383f0b04b45a0e5b49ec65" alt="Screenshot of configuring and ADX data connection" width="535" height="648" data-path="images/playfab/data-analytics/export-data/configure-new-data-connection-blob.PNG" />

<Note>
  We recommend using a table name that doesn't exist. If you use an existing table and the schema isn't what PlayFab is expecting, then the schema will be modified.
</Note>


## Related topics

- [Connecting to Azure Data Explorer](/services/playfab/data-analytics/export-data/data-connection-adx.md)
- [Connecting Azure Data Explorer to Insights](/services/playfab/data-analytics/legacy/connectivity/connecting-azure-data-explorer-to-insights.md)
- [Connecting Azure Data Factory (ADF) to Insights](/services/playfab/data-analytics/legacy/connectivity/connecting-azure-data-factory-to-insights.md)
- [Data Connections quickstart](/services/playfab/data-analytics/export-data/data-connection-quickstart.md)
- [Event Partitioning overview (Preview)](/services/playfab/data-analytics/export-data/event-partitioning-overview.md)
