Fix AzCopy OAuth Token Error When Copying to Azure Blob Storage
Question details
The user needs to resolve the AzCopy 10 error “no SAS or OAuth token is present” when copying files from a network share to a private Azure Blob Storage destination that requires authentication.
- Product
- AzCopy 10 and Azure Blob Storage
- Device & OS
- not provided
- Scenario
- Copying files from a network share to a private Azure Blob Storage container using AzCopy 10.
- Observed behavior
- AzCopy reports that no SAS or OAuth token is present and does not complete the copy to the private destination.
Confirm whether the destination Azure Blob container or storage account is set to private. Have your Azure tenant ID or a valid SAS token ready before running AzCopy.
Sign in with Azure AD and assign Storage Blob Data Contributor to the destination storage account
Use this solution when the destination is private and you want password-less authentication through the Azure AD identity running AzCopy.
Private Azure Storage does not allow anonymous access. AzCopy must present either an Azure AD OAuth token or a SAS token, so signing in with the correct tenant is the first fix.
Open Command Prompt, PowerShell, or your terminal in the environment where AzCopy 10 is installed.
Type azcopy login and press Enter. If your account belongs to multiple tenants, run azcopy login --tenant-id <tenant-id> to avoid selecting the wrong directory.
In the Azure portal, go to the Storage account or Blob container, select Access control (IAM) > Add role assignment, choose Storage Blob Data Contributor, and assign it to the signed-in user or service principal.
Rerun the AzCopy command, for example: azcopy copy "\\server\share\file" "https://<account>.blob.core.windows.net/<container>/<file>" --recursive.

Append a valid SAS token to the destination Azure Blob URL
Use this solution if you cannot use Azure AD sign-in or need delegated, time-limited access to a private blob container.
Use WPS Office as a Free Office Alternative for Files Copied to Azure Blob Storage
AzCopy authentication must be resolved in Azure, but WPS Office is a free lightweight Office suite for the Word, Excel, and PowerPoint files you copy to Azure Blob Storage. It supports Microsoft Office files, keeps a familiar interface, and works well after your Azure data transfer.
- 1. Download WPS Office: Go to the WPS Office website and download the free installer for Windows, macOS, Linux, Android, or iOS.
- 2. Open files copied to Azure Blob Storage: After the AzCopy transfer succeeds, open the downloaded Word, Excel, or PowerPoint files in WPS Office.
- 3. Edit and save in Office formats: Edit documents and save them as .docx, .xlsx, or .pptx to preserve Microsoft Office compatibility.

Frequently Asked Questions
Why does AzCopy 10 say “no SAS or OAuth token is present”?
Because the destination Azure Blob container is private and AzCopy has not obtained an Azure AD OAuth token or SAS token. Run azcopy login or append a valid SAS token to the destination URL.
How do I log in to Azure AD with AzCopy?
Run azcopy login in the terminal, complete the browser authentication, and if necessary specify azcopy login --tenant-id <tenant-id> to select the correct tenant.
Can I copy to a private Azure Blob Storage account anonymously?
No. Private containers require authentication. Use Azure AD role-based access or a SAS token.
How do I assign Storage Blob Data Contributor to an Azure AD user?
In the Azure portal, open the storage account or container, go to Access control (IAM), click Add role assignment, select Storage Blob Data Contributor, and select the user or service principal.
How do I append a SAS token to an AzCopy destination URL?
Create the SAS in the storage account's Shared access signature page, copy the query string, and append it to the blob or container URL with ? before the token.




