How to List contents of directory in azure data lake gen2 using sas url at directory level to get metadata for contents of folder

663 views Asked by At

The Error I am getting

I tried to follow this link: List folder in Azure Gen2 storage account with sas

following above link from postman and I am getting authorization error. what else should be added in header?

1

There are 1 answers

0
Vamsi Bitra On

I got same error in my environment; I just add below details. Now it’s working fine in postman

Go to azure storage account gen2 -> click on access control -> click on add ->add role assignment and select contributor as role, then select your service principle and save.

Ref1

SAS token Syntax

https://<StorageURL>/<Container>?directory=<DirectoryName>&restype=container&comp=list&<SASToken>

For more information follow this SO thread by Ivan Yang and this reference link