Create a Blob SAS token to be used with AzCopy

Create shared access signature (SAS) tokens for containers and blobs with Microsoft Storage Explorer – Azure Cognitive Services | Microsoft Docs

Go to your storage account in Azure and then choose the container where the files will be stored.

A picture containing text

Description automatically generated

Pick the container.

Graphical user interface, text, application

Description automatically generated

On the container choose Shared Access Tokens

Graphical user interface, application

Description automatically generated

Choose the permissions you want to give access to this token.

Graphical user interface, application

Description automatically generated

Change the date of the expiration of the token.

The max end is 2 years from the start date.

Graphical user interface, text, application, email

Description automatically generated

Create the SAS Token.

It will generate a Blob SAS URL, copy this to your clipboard.

Replace the highlighted yellow section with what is in the clipboard from the Blob SAS URL.

AzCopy command:

.\azcopy copy C:\Temp\filenameXXX.txt https://pigottlabsazcopydemo.blob.core.windows.net/demo?sp=xxxxxxxxxxxx3D

To copy a full directory:

.\azcopy.exe cp c:\Temp\ “https://pigottlabsazcopydemo.blob.core.windows.net/demo?sp=xxxxxxxxxxxx3D” –recursive

About the author

Jeff Pigott is a Senior Cloud Solution Architect at Microsoft, with expertise in Azure technologies such as Arc, DevOps, security, storage, and more. He has over 29 years of experience in IT, development, and DevOps, working with various platforms, tools, and languages. He is passionate about learning the newest Microsoft technologies and services, and holds several Azure certifications.