Azure with SAS - AuthorizationFailure

Hello,

I would like to use restic with remote repo at azure storage.
I would like to use the SAS authentication.
I got this message:

restic -r azure:seafile-data-restic-backup:/ init
enter password for new repository:
enter password again:
Fatal: create repository at azure:seafile-data-restic-backup:/ failed: container.CreateIfNotExists: storage: service returned error: StatusCode=403, ErrorCode=AuthorizationFailure, ErrorMessage=This request is not authorized to perform this operation

In Azure portal I did this:

  • Creating a container ‘seafile-data-restic-backup’
  • Click into the container
  • Creating a SAS Token with: alle permissions I can choose (read, write, list,…)
  • copying the SAS Token (without URL) to AZURE_ACCOUNT_SAS=“HEREISMYTOKEN”

My EXPORT Variables exists:

printenv | grep AZURE

AZURE_ACCOUNT_NAME="MYACCOUNTNAME"
AZURE_ACCOUNT_SAS="MYSECRETTOKEN"

So what could be wrong to get it run?

I’m using restic vesion: “restic 0.14.0 compiled with go1.19 on linux/amd64”

Could it be, that restic is creating a azure container in the storage account?
In this case it makes sense, that I cannot use SAS from a container, maybe only SAS from the Storage Account?

That looks like https://github.com/restic/restic/issues/4004

Thank you, thats exactly the problem.