# Connection to Azure Gen2 data lake with SAS key

**URL:** <https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071>\
**Category:** KNIME Analytics Platform\
**Tags:** azure\
**Created:** [December 7, 2022, 2:44pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071 "2022-12-07T14:44:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 7, 2022, 2:44pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/1 "2022-12-07T14:44:16Z")

</div>

Dear Knimers,

I am trying to connect to Azure using the Microsoft Authentication node with the **"Shared access signiture (SAS) authentication (Azure Storage only)**" Option.

I get the below error msg, when I click the browse button on the **Azure Data lake Storage Gen2 Connector** before executing this node.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/3/e/3e43e65f94f17cd1672fdca939f651118b586b23.png)

If i run the node,i get the below error:

_ **ERROR Azure Data Lake Storage Gen2 Connector 4:2 Execute failed: Server encountered an internal error. Please try again after some time.** _

If I consume the SAS URL through my web browser, it works.

I am using the latest 4.7 release. Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 8, 2022, 6:15am UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/2 "2022-12-08T06:15:25Z")

</div>

@AlexanderFillbrunn is it possible that you can help with this, please? thanks in advance

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [December 8, 2022, 9:28am UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/3 "2022-12-08T09:28:52Z")

</div>

Hi Bashar,  
Internal Server Error is an error occurring in the backend, so in Azure Gen2 and I am not sure if KNIME can affect this in any way. Do you see more information about the error in the KNIME log via View → Open KNIME Log?  
Kind regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 8, 2022, 9:55am UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/4 "2022-12-08T09:55:32Z")

</div>

Thanks,Alexander for your reply, attached is the relevant part of the log.  
[Gen2.txt](https://forum.knime.com/uploads/short-url/dZZLpfv0pwRFcWFs7twMrRLt5x9.txt) (29.0 KB)  
Kind regards,  
Bashar

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [December 8, 2022, 12:23pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/5 "2022-12-08T12:23:13Z")

</div>

Hi Bashar,  
Thanks for the log files. Unfortunately they do not contain additional information. The error occurs when the node checks if you are successfully authenticated, but the server only returns the error code. Generally, error codes starting with 4 mean that the client sent the request in the wrong fashion, but error codes starting with 5 indicate a problem on the server side. Maybe you can inquire with your cloud team if they can help.  
Kind regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 8, 2022, 12:56pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/6 "2022-12-08T12:56:22Z")

</div>

Hi Alexander,  
Thanks again for your help on this, I have checked with my cloud team and they are wondering since I am able to access the ADLS from my laptop with the same SAS URL ( consuming this with chrome and IE) That I am using in Knime, while Knime is sending its requests to the cloud, will it use it will use any other IP than my local IP?? and is there way to check what IP knime is using to communicate with the Cloud?

the reason behind this question is that the datalake is currently open for my internet IP only.

thanks again.  
Kind regards,  
Bashar

---

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 12, 2022, 12:35pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/7 "2022-12-12T12:35:11Z")

</div>

Hi @AlexanderFillbrunn ,  
we communicated with Microsoft on this issue and we have the following diagnosis :

##########################  
While using a user-delegated SAS token to grant access to a single container, this wouldn’t allow your application to perform operations outside of that specific container e.g. any management-level operation should fail with a 403-status code, this is expected behavior [Create a user delegation SAS - Azure Storage | Microsoft Learn](https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Frest%2Fapi%2Fstorageservices%2Fcreate-user-delegation-sas%23specify-the-signed-resource-field&data=05%7C01%7Cbabughannam%40aldar.com%7Cdcc334baef074c46e3ce08dadc2a7283%7Cab98858ace1a4feaa19be31ea792a488%7C0%7C0%7C638064372131348938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GSYNyZ7C4wkZUWplSQ2YPL9sbmix4KD9z9dHnMbKTgI%3D&reserved=0)

KNIME Request:

 ![knime req](https://forum-cdn.knime.com/uploads/default/original/3X/2/f/2f207113fea1c93783ccfe54d1a38f73ecb4d1bb.png)

From the request above, we can see KNIME trying to perform a list operation on the account [List Containers (REST API) - Azure Storage | Microsoft Learn](https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Frest%2Fapi%2Fstorageservices%2Flist-containers2%3Ftabs%3Dazure-ad&data=05%7C01%7Cbabughannam%40aldar.com%7Cdcc334baef074c46e3ce08dadc2a7283%7Cab98858ace1a4feaa19be31ea792a488%7C0%7C0%7C638064372131348938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xBhZlFrnWQ5Fvn%2F%2FBGM%2FcIbSPi96DHPcnt7HL9NHqoI%3D&reserved=0) . With the SAS token granted to KNIME on the container level, this request would fail as it does not have enough permission to perform the list operation. From our replication on KNIME, we could see the application returning the error below:

 ![error](https://forum-cdn.knime.com/uploads/default/original/3X/b/f/bfff42f26f00f5c3e0ea2304488e9a4a3ab56a27.png)

#####################

we are having Knime as part of our enterprise architicture, Is there a way to access the resources in the lake with the SAS token?

Much appreciated.

Kind regards,  
Bashar

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [December 12, 2022, 1:55pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/8 "2022-12-12T13:55:02Z")

</div>

Hi @Bashar,  
Does the error just occur in the dialog when you want to browse? I think browsing might call the list operation, as it needs you to select a container. What if you enter a file path manually without browsing? Does that work?  
Kind regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![Bashar](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@Bashar](https://forum.knime.com/u/Bashar)\
**Post date:** [December 12, 2022, 6:35pm UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/9 "2022-12-12T18:35:23Z")

</div>

Hi Alexander,  
The error happens when when browsing and when putting a folder path.  
When granted the rights to list containers, both options work. But this violates our security policy as the SAS is very specific for what I can consume.

I am available to go through this over a zoom call to demonstrate.

Kind Regards,  
Bashar

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [December 14, 2022, 9:59am UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/10 "2022-12-14T09:59:54Z")

</div>

Hi Bashar,  
I just tried it with my colleagues and it worked fine. They will contact you regarding the issue and set up a call. If you can, please update us here as well so the community knows the solution 🙂  
Kind regards,  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [March 14, 2023, 10:00am UTC](https://forum.knime.com/t/connection-to-azure-gen2-data-lake-with-sas-key/53071/11 "2023-03-14T10:00:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
