AzCopy & Storage Explorer
Sign-in · copy vs sync · defaults · server-to-server copy · Storage Explorer connections
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
AzCopy v10 commands
| Task | Command | Notes |
|---|---|---|
| Sign in with Microsoft Entra ID | azcopy login | Device code by default. Add --tenant-id=<tenant-id> if sign-in errors. Needs an OS secret store. |
| Create a container | azcopy make 'https://<acct>.blob.core.windows.net/<container>' | There is no create command. |
| Upload a folder with subfolders | azcopy copy 'C:\myDirectory' '<container-url>' --recursive | --recursive is needed to traverse subdirectories. |
| Upload folder contents only | azcopy copy 'C:\myDirectory\*' '<container-url>/<dir>' | The folder name itself is not kept. |
| Copy a container between accounts | azcopy copy '<src-container-url>' '<dst-container-url>' --recursive | Server-to-server: data flows between storage servers. |
| Incremental update | azcopy sync '<local-path>' '<container-url>' --recursive | One-way only. |
| Mirror deletes too | azcopy sync ... --delete-destination=true | Also accepts prompt. |
| Upload straight to Archive | azcopy copy ... --block-blob-tier=Archive | Tier values: None, Hot, Cool, Archive. |
| Resume an interrupted job | azcopy jobs list, then azcopy jobs resume <job-id> | Logs and plan files are kept. |
The AzCopy v10 command list is: bench, copy, doc, env, jobs, list, login, login status, logout, make, remove, sync, set-properties. There is no rename command.
Defaults to know
| Command | Flag | Default |
|---|---|---|
| copy | --overwrite | true (also false, prompt, ifSourceNewer) |
| copy | --recursive | false |
| copy | --blob-type | Detect |
| copy | --s2s-preserve-access-tier | true (set false if the destination doesn't support tiers, such as a premium block blob account) |
| copy | --s2s-preserve-blob-tags | false |
| sync | --recursive | true |
| sync | --delete-destination | false |
| sync | --compare-hash | None (or MD5) |
| sync | --mirror-mode | false |
Authorization
- AzCopy authorizes with Microsoft Entra ID (user, managed identity or service principal) or a SAS token appended to the URL.
- Owner on the account does not grant data access. Entra sign-in needs a data role: Storage Blob Data Reader to download, Storage Blob Data Contributor or Owner to upload. For Azure Files: Storage File Data Privileged Reader or Contributor.
- Role assignments can take up to 5 minutes to propagate.
- Managed identity:
azcopy login --identity(system-assigned), or add--identity-object-idor--identity-resource-id(user-assigned). Environment option:AZCOPY_AUTO_LOGIN_TYPE=MSI. - Service principal:
AZCOPY_AUTO_LOGIN_TYPE=SPNwithAZCOPY_SPA_APPLICATION_ID,AZCOPY_SPA_CLIENT_SECRETandAZCOPY_TENANT_ID, orazcopy login --service-principal --application-id <id>. Microsoft recommends a managed identity over a service principal when running on Azure. - Reuse an existing sign-in:
AZCOPY_AUTO_LOGIN_TYPE=AZCLI(withAZCOPY_TENANT_ID) for Azure CLI, orPSCREDfor Azure PowerShell. - Enclose path and URL arguments in single quotes (double quotes in the Windows Command Shell, cmd.exe).
- If the storage firewall is on, AzCopy must run from inside the allowed IP range or virtual network.
copy vs sync
- copy transfers data.
--overwritecontrols conflicts; deleting destination files is a sync option. - sync is one-way: you choose a source and a destination. It compares file names and last-modified time.
--compare-hash=MD5compares hashes instead; without it, accurate clocks matter. - Deleting files that are missing from the source needs
--delete-destination. Turn on blob soft delete first so mistakes can be undone. - Microsoft's pages differ on which pairs sync supports: the Learn page says local to Blob storage only; the GitHub wiki lists more. Learn is the safe statement for the exam.
copy --overwrite=ifSourceNeweris a lower-memory, lower-cost alternative to sync.- AzCopy doesn't support a source or destination that changes during a transfer.
- Account-to-account copy is server-to-server, but the client still needs network access to both accounts. With Entra auth for both, the accounts must be in the same tenant. Index tags are not preserved by default.
- For large-scale migrations (over 1 TB) the Learn page points to Azure Storage Mover.
Storage Explorer
- A standalone desktop app for Windows, macOS and Linux. Connect to a subscription, storage account, blob or ADLS container, file share, queue, table, or the Azurite emulator.
- Two connection styles: sign in to Azure with an Entra account (needs management-layer and data-layer permissions to see everything), or attach to a single resource by connection string, key, SAS URL or Entra.
- Entra-only attach is the choice when you have data access but no management-layer access.
- Can create containers, upload (Append, Page or Block blob type; .vhd and .vhdx are recommended as page blobs), download, manage snapshots, and generate SAS.
- Storage Explorer SAS: account level gives an account SAS; container or blob level gives a service SAS. Both are signed with the account key. It can't create a user delegation SAS.
- Storage Explorer can attach to a storage account with its name and key, or with a SAS connection string.
Exam Tips
Tick each tip once you can answer it without looking.
“VM with a system-assigned managed identity uploads with AzCopy and no stored secrets” → azcopy login --identity plus Storage Blob Data Contributor. Trap: service principal secret kept in the script.
“azcopy sync with no flags; files deleted from the source still exist in the container” → --delete-destination defaults to false. Trap: assuming sync mirrors deletes by default.
“Upload a local folder including subfolders” → azcopy copy <path> <container-url> --recursive. Trap: without --recursive subdirectories are not traversed.
“Keep a container identical to a local folder, removing deleted files” → azcopy sync ... --delete-destination=true. Trap: azcopy copy has no delete option; --overwrite only controls conflicts.
“Two-way sync between two folders” → Not possible: azcopy sync is one-way. Trap: a bidirectional flag.
“azcopy login worked but the copy returns 403; the user is subscription Owner” → Assign a data role such as Storage Blob Data Contributor. Trap: Owner and Contributor are management roles; regenerating keys doesn't help.
“Role assigned a minute ago but AzCopy still fails” → Wait: propagation can take up to 5 minutes.
“Role needed to download blobs with Entra sign-in” → Storage Blob Data Reader. Trap: the management Reader role.
“Copy a container between two accounts without routing data through the client” → azcopy copy uses server-to-server APIs. Trap: downloading and re-uploading.
“Copy to a premium block blob account fails because of the tier” → Add --s2s-preserve-access-tier=false. Trap: changing the source to Hot.
“Upload straight to the Archive tier” → --block-blob-tier=Archive.
“Create a container from the command line with AzCopy” → azcopy make. Trap: azcopy create doesn't exist.
“Rename a blob with AzCopy” → Not supported: there is no rename command. Trap: azcopy rename.
“Resume an interrupted AzCopy job” → azcopy jobs resume <job-id>. Trap: rerunning from scratch with --overwrite.
“Protect against mistakes before using sync with --delete-destination” → Enable blob soft delete.
“Storage Explorer generates a SAS for a container: which type?” → Service SAS, signed with the account key. Trap: a user delegation SAS: Storage Explorer can't create one.
“Attach a container in Storage Explorer when you have data-layer access but no management-layer access” → Sign in using Microsoft Entra ID when attaching to the resource.
“AzCopy from an admin laptop fails; the storage firewall is on” → The laptop must be inside an allowed IP range or virtual network. Trap: a missing management role.
Sources
- AzCopy v10 overview
- Authorize AzCopy with a user identity
- Authorize AzCopy with a managed identity
- Authorize AzCopy with a service principal
- Upload files with AzCopy
- Copy blobs between accounts with AzCopy
- Synchronize with AzCopy
- Quickstart: Storage Explorer
- Get started with Storage Explorer
- Storage firewall limitations
- azcopy copy (GitHub wiki)
- azcopy sync (GitHub wiki)
Checked against Microsoft Learn on November 13, 2026.