web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Read data from the Azure Blob Storage in a folder structure

(0) ShareShare
ReportReport
Posted on by 1,455

Hi Experts,

I am having a issue while reading the file from Azure Blob Storage. It works fine if we provide only container name as parameter. But we have folder structure.

For Ex., if container is "TestContainer" and inside this we have a folder named "TestFolder". We are storing the files under "TestFolder"

The uplaod is working fine but when we want to read, we are getting error.

Code Snippet:

Working when we specify only container name, but gives every folder data. But we want to read only specific.

BlobClient.Initialize(storageAccount, 'TestContainer', Authorization);

response := BlobClient.ListBlobs(content);

Not working when we specify only container name along with folder name:

BlobClient.Initialize(storageAccount, 'TestContainer/TestFolder', Authorization);

response := BlobClient.ListBlobs(content);

Response below:

Response Code: 400 The requested URI does not represent any resource on the server.

Any suggestions are highly appreciated.

Thanks in advance.

Regards

Avinash B

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    You have to use the optional parameters for that.

    Here is an example

    procedure GetBlobsFromIncomingContainer(var ABSContainerContent: Record "ABS Container Content"; FolderPath: Text)

       begin

           InitializeIncomingContainer();

           ABSOptionalParameters.Prefix(FolderPath);

           ABSOperationResponse := ABSBlobClient.ListBlobs(ABSContainerContent, ABSOptionalParameters);

           CheckError(ABSOperationResponse);

       end;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,917

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,161 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans