Browse directory and files in ADLS with SAS URL

Bhushan Gawale 331 Reputation points
2023-10-24T13:34:19.7766667+00:00

After generating a shareable link to a directory using Directory scoped SAS in Azure Data Lake Storage, how can end users / link consumers effectively utilize this link to access and read the files within the directory?

It seems that direct access via the browser lacks a file browsing interface – what are the recommended methods or tools for users to navigate and access the files associated with the generated link?

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,562 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bhushan Gawale 331 Reputation points
    2023-10-25T03:47:39.7466667+00:00

    While Storage Explorer could be a potential solution, the requirement to have end users install it on their machines may not be ideal since the shareable links are meant to be accessible by anonymous audience. Therefore, looking for an interface that allows end users to browse folder contents directly in a web browser, making it more user-friendly and relying on the permissions set on the link.

    1 person found this answer helpful.
    0 comments No comments

  2. QuantumCache 20,366 Reputation points Moderator
    2023-10-31T05:56:51.5366667+00:00

    Hello @Bhushan Gawale,

    I agree with you!

    As you mentioned, direct access via the browser lacks a file browsing interface.

    To address this, you can use the Azure Data Lake Storage Gen2 REST API to build a custom web interface that allows end users to browse the contents of the directory. The REST API provides a set of operations that allow you to interact with the data in your storage account programmatically.

    You can use the List Path operation to retrieve the contents of a directory. This operation returns a JSON object that contains information about the files and subdirectories in the specified directory. You can then use this information to build a custom web interface that allows end users to browse the contents of the directory.

    Here's an example of how to use the List Path operation to retrieve the contents of a directory using the Azure Storage REST API:

    GET https://myaccount.dfs.core.windows.net/myfilesystem/mydirectory?recursive=true&resource=filesystem&api-version=2020-02-10 Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBP...
    

    You can find more information about the List Path operation and other operations available in the Azure Data Lake Storage Gen2 REST API in the official Azure documentation:

    https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/list

    I hope this helps! Let me know if you have any further questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.