Azure File storage SAS TOKEN

Ramya Harinarthini_MSFT 5,331 Reputation points Microsoft Employee

I can upload files to ADLS Gen 2 blob storage with AzCopy through OAuth authorization, but I am unable to upload to file storage with the same. It is asking for SAS token. Please tell me the process of generating SAS token. Thanks.

[Note: As we migrate from MSDN, this question has been posted by an Azure Cloud Engineer as a frequently asked question]

MSDN Source: Azure File storage SAS TOKEN

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,424 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChiragMishra-MSFT 956 Reputation points

    Welcome to the Microsoft Q&A (Preview) platform.

    Happy to answer your query.

    You can generate the SAS token: Settings => Shared access signature => Select the options required and click on generate SAS and connection string and copy the SAS token.


    To learn more about SAS tokens and how to obtain one, see Using shared access signatures (SAS).

    Use only the latest version of AzCopy (AzCopy v10):

    Option1: Use Azure AD

    Download a single file using OAuth authentication. Please use 'azcopy login' command first if you aren't logged in yet:

    azcopy cp "https://[account][container]/[path/to/blob]" "/path/to/file.txt"   

    Upload a single file with a SAS:

    azcopy cp "/path/to/file.txt" https://[account][container]/[path/toblob]?[SAS]   

    Option2: Use a SAS token

    You can append a SAS token to each source or destination URL that use in your AzCopy commands.

    This example command recursively copies data from a local directory to a blob container. A fictitious SAS token is appended to the end of the of the container URL.

    azcopy cp "C:\local\path" "" --recursive=true   

    Hope this helps.

    MSDN Source: Azure File storage SAS TOKEN

    0 comments No comments

0 additional answers

Sort by: Most helpful