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, specializing in Azure Infrastructure technologies including Azure Arc, Azure Update Manager, SQL DB, security, and storage. With over 29 years of experience in IT, development, and DevOps, Jeff has worked with a wide range of platforms, tools, and languages. Jeff is passionate about staying up-to-date with the latest Microsoft technologies and services, and holds multiple Azure certifications.