I have ADLS Gen 2 SDK directory SAS generated and I am trying to use that SAS to list the directory content (get a list of all files in the directory). I reviewed the ADLS Gen 2 SDK python doc [enter link description here][1] but I was not able to find any example for how to create DataLakeDirectoryClient using a directory SAS token. Anyone has any idea on how to do that? I tried breaking down the SAS token into two parameter, "account_url" and "credential", and then create data lake service client as follow:
d = DataLakeServiceClient(account_url=account_url, credential=credentials)
file_system = d.get_file_system_client(path-to-container)
paths = file_system.get_paths(path=path-to-directory)
but that did not work since when I tried to iter through the paths I got the following error
*azure.core.exceptions.ClientAuthenticationError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ErrorCode:AuthenticationFailed
authenticationerrordetail:Signature did not match. String to sign used was rl*
note: iter through the paths works only if I connect “storage account credentials”