# How to Set up an Azure Data Lake Storage for Integrating with Daton

## Prerequisites

To establish a connection between Azure Data Lake Storage and Daton, the following prerequisites are required:

* Azure ADLS Gen2 account with Administrator permissions and a Daton account.
* An ADLS Gen2 container
* Permission to create an Azure service principal

### Task 1: Create a Storage Account

To create a new Storage Account:

1. Log in to the [Azure portal](https://portal.azure.com/).
2. On the Navigation Pane, click **Storage Accounts.**&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FoZQsWRbuU18CyZTvOPHs%2F1Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=2095446c-271e-46fb-a725-ff214f2e817b" alt="" width="188"><figcaption></figcaption></figure>
3. On the redirected page, click **Create.**&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F5Cloftc6jWznsByNzRMT%2F2Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=940ad26e-d7e6-4701-9579-5c2c19d88327" alt=""><figcaption></figcaption></figure>
4. Provide a unique **Storage account name** in the Basics tab. (This name will be used during integration in Daton)&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F7kPAEPuxYLnFMSd5vtOQ%2F3Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=5d122066-7d7c-49c8-9892-3a45b3e81c8f" alt=""><figcaption></figcaption></figure>
5. Follow the [Microsoft Azure documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json\&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json\&tabs=azure-portal#create-a-storage-account-1) for detailed information on creating a storage account.

### Task 2: Create an ADLS container

1. Navigate to the storage account you generated in [Task 1](#task-1-create-a-storage-account).
2. Access Containers in the navigation menu and click **Create Container**.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FUCDIpzOVuromqiOs7UTI%2F4Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=1eff48f4-5b8d-4b86-ae17-a1036eeaf533" alt=""><figcaption></figcaption></figure>
3. Within the New Container pane, input a Name for your container. (This name will be used during integration in Daton)&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FLtF3w17vASb0SInZapPw%2F5Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=cdbf3741-d0ef-4001-868c-5b68626a34c0" alt="" width="375"><figcaption></figcaption></figure>
4. Choose an **access level** for the container from the access level drop-down menu and click **Create**.

### Task 3: Register an Application and Add a Service Principal

1. Navigate to Azure Active Directory in the navigation menu.
2. Access **App registrations** and click **New registration**.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2F9o2410IUlUZWrgX1vp5B%2F6Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=c647c152-a280-43dd-ba9a-01b8872fabb5" alt=""><figcaption></figcaption></figure>
3. Provide a **Name** for the application.&#x20;
4. In the Supported Account Types section, choose **Accounts in this organizational directory only**, and then click **Register**.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FYujneS3LLUwRBTyuGxRi%2F7Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=c106fdc3-65b8-4b12-83bd-08f92d1b0086" alt=""><figcaption></figcaption></figure>
5. Your **Application (client) ID** and **Directory (tenant) ID** will be displayed. Take note of these as you will require them during Daton configuration.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FaziOGZq7kmFJ8Ef8IEzx%2F8Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=b18cfc18-4871-4e92-96b5-1cd7e0fe8d99" alt=""><figcaption></figcaption></figure>

### Task 4: Create a Client Secret

1. Choose the application you registered in [Task 3](#task-3-register-an-application-and-add-a-service-principal).
2. Navigate to **Certificates & secrets** in the navigation menu, and click **New client secret**.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FNmc1iu97AvlvUdkeZUwD%2F9Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=b59d868d-300b-4aea-8ffc-06049d81fc19" alt=""><figcaption></figcaption></figure>
3. Provide a Description for your Client Secret.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FskdLMQf8Ly1y01TJsnne%2F10Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=b4ef8d50-fc13-4faa-a1d8-7e739dd4df10" alt="" width="375"><figcaption></figcaption></figure>
4. Select an expiry period for the client secret from the **Expires** drop-down menu and click **Add**.
5. Take note of the client secret, as you'll need it for configuring Daton.&#x20;

   <figure><img src="https://15515196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LbJ1eMq5M51cIpU163R%2Fuploads%2FDeNeXIeqLCfI7z9Bqg5L%2F11Azure%20Data%20Storage%20pre.png?alt=media&#x26;token=77519a5c-a1d2-46b5-a656-dbb5db5aaf6d" alt=""><figcaption></figcaption></figure>

### Task 5: Assign a Role to the Container

1. Select the Container created in [Task 2](#task-2-create-an-adls-container) and select **Access Control (IAM)**.
2. Click **Add**, then select **Add role assignments**.
3. On the Role tab, choose **Storage Blob Data Contributor** and proceed.
4. Within the Member tab, opt for User, group, or service principal.
5. Click **Select members,** pick the service principal added in [Task 3](#task-3-register-an-application-and-add-a-service-principal), and then click **Select**.
6. Click **Review + Assign**.
