# Configure Azure Blob Storage

### Azure Blob Storage Integration for WhatsApp Media

The Azure Blob Storage integration in WhatsApp4Dynamics allows you to offload media files from Dynamics 365 CRM to your Azure environment. This includes attachments like images, videos, and documents shared during WhatsApp conversations. By storing media externally, you reduce CRM storage consumption, improve system performance, and gain better control over file access and management.

### Prerequisites

Before configuring Azure Blob Storage:

* You must have an active Storage Account in your Microsoft Azure portal.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FhLwT4kUCMy0CxRjGOHc0%2Fimage.png?alt=media&#x26;token=b2c8adfa-d964-44b9-b8d3-4971a80a5f58" alt=""><figcaption></figcaption></figure>

* Ensure that anonymous access for blob containers is enabled, if required for your use case.

### How to configure Azure Blob Storage in WhatsApp4Dynamics

1. Open the WhatsApp4Dynamics app in your Dynamics 365 environment.
2. Navigate to Configurations > WhatsApp Preferences.
3. In the Storage Platform section, open the dropdown and select Azure Blob Storage.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F9xkyUXW0jVLwswmQBX9K%2Fimage.png?alt=media&#x26;token=1816667b-b66b-43b9-b2b8-053721cd4dd6" alt=""><figcaption></figcaption></figure>

4. Enter the required Azure Blob Storage details:

* Storage Access Key
* Storage Account Name
* Container Name

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FEwgbFTuurtzJOxcM01yd%2Fimage.png?alt=media&#x26;token=37bb1852-d1b2-497d-82fb-ace97eaf7819" alt=""><figcaption></figcaption></figure>

5. Click Save and Validate to complete the configuration.

### How to retrieve Azure storage details

Get your Storage Access Key:

1. Log in to the **Azure Portal**.
2. Go to your **Storage Account**.
3. Navigate to **Security + Networking > Access keys**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F0TmsZrEfEE4Fl6h2kdSX%2Fimage.png?alt=media&#x26;token=875251e7-673e-4a51-a6e1-a76802460c44" alt=""><figcaption></figcaption></figure>

4. Copy one of the access keys.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FED4Yf8QDmp01UbIh4k0E%2Fimage.png?alt=media&#x26;token=56c1bfcf-1002-45a9-8477-1d3e98bbfd54" alt=""><figcaption></figcaption></figure>

5. Paste it into the **Storage Access Key** field in WhatsApp4Dynamics.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FCUr66ZoHAJ3YLMP64TvU%2Fimage.png?alt=media&#x26;token=9344b3a7-7abc-47e3-8c3e-70bd1eeb215e" alt=""><figcaption></figcaption></figure>

### Get your Storage Account Name:

1. In the Azure Portal, locate your Storage Account.
2. Copy the Storage Account Name.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FaS6MB5DQqJOJqLOLR6bi%2Fimage.png?alt=media&#x26;token=653d5363-4dce-47f7-b1e9-d1ef5f8bb43d" alt=""><figcaption></figcaption></figure>

3. Paste it into the corresponding field in WhatsApp4Dynamics.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FFHmPGQeyAPpMJkJ6IRFr%2Fimage.png?alt=media&#x26;token=f5b9646e-3e10-4bef-9339-f41f151fcc7d" alt=""><figcaption></figcaption></figure>

### Container Setup in Azure

* You can use your existing container or directly create a new container from WhatsApp4Dynamics.
* If you choose to use an existing container, make sure to enable the Allow Blob anonymous access setting in the Azure portal.
* If you want to create a container, please follow the steps mentioned below.
* Enter your desired Container Name in the WhatsApp4Dynamics configuration.
* Upon clicking Save and Validate, the system will automatically create the container in Azure (if it doesn’t already exist).

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F2ONhP5N1qsOWSQvFYgX3%2Fimage.png?alt=media&#x26;token=cd471e4a-46db-491d-886c-11fc1d41d4d0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FVty2iQQBsJQNhI3CJpcg%2Fimage.png?alt=media&#x26;token=6ebbd139-1abe-4577-8c37-54272b2e6b68" alt=""><figcaption></figcaption></figure>

### Enabling anonymous access for container creation

To create your own container with a specific anonymous access level, you must first enable the **“Allow Blob anonymous access”** setting in the Azure portal.

If you wish to allow specific anonymous access levels for containers:

1. In the **Azure Portal**, go to your **Storage Account.**
2. Navigate to **Settings** > **Configuration**.
3. Locate the setting **Allow Blob anonymous access**.
4. Set this option to **Enabled**.
5. After enabling, you can configure access levels during container creation.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FOQH4yanEH0yUhJGjsCV8%2Fimage.png?alt=media&#x26;token=16ce9514-3e2d-46cb-9a6c-73bd1f65c913" alt=""><figcaption></figcaption></figure>

* If the configuration is successfully validated, the **Storage Media Status** will change from **Draft** to **Authenticated**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FlwfSHhJEehv50JEUbdVp%2Fimage.png?alt=media&#x26;token=351d0e30-5d03-45ee-945f-a4525c3e2b14" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note: Ensure the container's anonymous access level is not set to Private for successful configuration.**
{% endhint %}

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FGAM7ElQJTKGdZqkgnZFl%2Fimage.png?alt=media&#x26;token=07708489-7dd8-4a19-817e-6b5a11ea5def" alt=""><figcaption></figcaption></figure>

### How to view stored media files

1. Send a media file (e.g., image, video, document) using the WhatsApp4Dynamics chat interface.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FqdUk0TamjuHtSmdyPCZ1%2Fimage.png?alt=media&#x26;token=6e039820-c2c1-4b63-ab60-32a0911deb4c" alt=""><figcaption></figcaption></figure>

2. Log in to the **Azure Portal** and navigate to the configured container.
3. Open the folder named **WhatsAppMedia**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FYM8WrFDH7wynjCEOk9Ji%2Fimage.png?alt=media&#x26;token=0b172bd4-d439-4515-8a58-bede0083a1da" alt=""><figcaption></figcaption></figure>

4. All sent media files will be stored and accessible here.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FmP1aDCMpj7kU9M52k4wB%2Fimage.png?alt=media&#x26;token=a6bee355-b033-4d6e-9818-605af37a4d70" alt=""><figcaption></figcaption></figure>
