Hello UrBel
Thank you for your question!
Firstly, check your SAS tokens which generated with a defined start time and expiry time?
Because your AZCopy job runs longer than the expiresOn
(or se
parameter) value specified in the SAS token, the token becomes invalid, and all subsequent operations will fail with a 403-authentication error. This is by far the most common reason for transfers failing partway through.
If you are using SAS ensure the token has not expired. Check the se (expiry time) and st (start time) parameters in the SAS token URL. For a transfer of this scale, set a long expiry time (e.g., several days or weeks) to avoid interruptions. or if you were using a Storage Account Access Key directly in your AZCopy command, or if the SAS token was generated based on a stored access policy that has since been revoked or modified, the existing credentials will become invalid.If you’re using azcopy login with Azure AD, ensure the user, service principal, or managed identity has the Storage Blob Data Contributor or Storage Blob Data Owner role assigned to the storage account or container.
- Navigate to the storage account → Access Control (IAM).
- Click Add → Add role assignment.
- Select Storage Blob Data Contributor or Storage Blob Data Owner and assign it to your identity.
Post which Go to your Storage Account -> Networking -> Firewalls and virtual networks.
- Ensure "Public network access" is set to "Enabled from all networks" (less secure but rules out firewall issues for testing).
- Or, if set to "Enabled from selected virtual networks and IP addresses," ensure your local server's current public IP address is explicitly added to the "Address range" list.
Ensure you’re using the latest version of AzCopy (v10.25.1 as of June 2025). Older versions may have bugs or compatibility issues.
- Download the latest version from the Microsoft AzCopy documentation.
References:
- https://stackoverflow.com/questions/61071381/how-to-process-string-of-concatenated-json-blobs-into-list-of-strings-with-jacks/61105471#61105471
- https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/blobs/connectivity/storage-use-azcopy-troubleshoot
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.