Error when try to download file from Azure Data Lake

Nanddeep Nasnodkar 1 Reputation point

I tried to download a file from Azure Data Lake. With the credentials, I can list the contents of the directory. But Downloading gives below error:
"This request is not authorized to perform this operation using this permission"

The code used:

TokenCredential credential = new ClientSecretCredential(  
            tenantID, clientID, clientSecret, new TokenCredentialOptions());  
string dfsUri = "https://" + accountName + "";  
DataLakeServiceClient dataLakeServiceClient = new DataLakeServiceClient(new Uri(dfsUri), credential);  
DataLakeFileSystemClient fileSystemClient = dataLakeServiceClient.GetFileSystemClient("DAIP_Data");  
DataLakeDirectoryClient directoryClient =  
DataLakeFileClient fileClient =  
Response<FileDownloadInfo> downloadResponse = await fileClient.ReadAsync();  

Any suggestion/ help would be appreciated.


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,278 questions
{count} votes