Remote for Azure Gen 1, using service principal

What is the problem you are having with rclone?

Rclone is great!

I have been trying to create a remote for azure gen 1 storage account using service principal option. Created the service principal file, put it in the path and Rclone is reading it but unfortunately receiving the following error:

2021/08/04 06:47:09 ERROR : : error listing: ->,
===== RESPONSE ERROR (ServiceCode=) =====
Description=failed to unmarshal response body, Details: (none)
   Authorization: REDACTED
   User-Agent: [rclone/v1.56.0]
   X-Ms-Client-Request-Id: [xxxxxxx]
   X-Ms-Version: [2019-12-12]
   RESPONSE Status: 401 Unauthorized
   Cache-Control: [private, no-cache, no-store, max-age=0]
   Content-Type: [application/json; charset=utf-8]
   Date: [Wed, 04 Aug 2021 06:47:08 GMT]
   Strict-Transport-Security: [max-age=15724800; includeSubDomains]
   Www-Authenticate: [Bearer authorization_uri="", error="invalid_token", error_description="The access token audience is invalid.", resource=""]
   X-Content-Type-Options: [nosniff]
   X-Ms-Request-Id: [xxxxxxxx] 

$ rclone config show azure
type = azureblob
account = xxxxxxx
service_principal_file = ./azure-principal.json
endpoint =

What is your rclone version (output from rclone version)

rclone v1.56.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

linux , 64 bit

Which cloud storage system are you using? (eg Google Drive)

Azure Gen 1 Storage

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone lsd azure:

The rclone config contents with secrets removed.

type = azureblob
account = xxxxxxx
service_principal_file = ./azure-principal.json
endpoint =

A log from the command with the -vv flag

Paste  log here

Hey vijay

Did you manage to resolve this issue? Im facing the exact same problem and would appreciate your experience in resolving it.


Hi Job_Maelane,

I tried editing the reclone codes but unfortunately came to a conclusion that it’s not supported for Azure blob gen 1.

Let me know if you got some plans.

Thank you Vijay.
I think I came to the same conclusion yesterday when i exhausted all avenues.
Appreciate your response.

You are welcome !! :slightly_smiling_face:


could this help?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.