Forum Discussion

Chandan's avatar
Chandan
New Contributor III
2 years ago

Read files for Azure "File Shares"

I have a new requirement to read the files stored in Azure "File Shares". I didnt have the knowledge about "File Shares" in azure and did a little research. Its a virtual drive which can be used for storing files and uses the SMB protocol to read from this storage.

 

i have setup the file reader like this

smb://{accountName}}.file.core.windows.net/{fileSharefolder}/{pathToFile}
 
I have also tried setting up SMB account but it asks for a username and password which i dont have.
I have azure account name and access key which i have used in setting SMB account. ( This could be the issue i'm not sure though ).

In validation, i'm getting the following error :
(actual values masked with generic name here)
"error": "Error occurred while creating a mount smb://accountname.file.core.windows.net/fileshare/pathtofile" 

Can someone guide or assist me with setting this up ? Also it will be very helpful if you can share a sample pipeline showing SMb account setup.

4 Replies

    • sreddi's avatar
      sreddi
      Employee

      Chandan 

      Please find the SMB Account and Snap settings - 

      SMB Account Settings - 

      SMB Snap settings from pipeline parameters - 

       

      SMB Snap settings along with Output Preview - 

       

      • Chandan's avatar
        Chandan
        New Contributor III

        I'm able to create the SMB string but i guess the SMB account setup is messed up.
        I'm using correct domain name <myazureaccountname>.file.core.windows.net 
        What i dont understand is what should i put username and password.
        Is it the Active Directory credentials of my user account i should put here ?
        is there a way i can just connect to SMB storage using azure account name and access key ?

  • darshthakkar's avatar
    darshthakkar
    Valued Contributor

    Hi Chandan,

    Have you used MS Azure Storage explorer by any chance? Reason being, it will make things easier for you. If you have admin rights in your organization then I would suggest to create a "Basic Auth" account like below in snapLogic:

    With the following username and password (works ONLY if you have admin rights):

     

     

    After the account has been setup, you can pretty much use it across different pipelines, please ensure that the account has been created in "shared" folder. Using a directory browser (if you have multiple files under that location in Azure) followed up by a file reader should help you.

    Thank you.

    Regards,

    Darsh