Please help with error PermanentDeleteNotSupportedOnRootBlob
I generated SAStoken for BLOB with all permissions including Delete & Permanent Delete
While making API call using below blog https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob
request url: "https://[SAS URL]&deletetype=permanent"
Getting 409 error as "PermanentDeleteNotSupportedOnRootBlob"
x-ms-delete-snapshots in the header is "include"
Storage Account - 'Permanent Delete soft deleted blobs' option is enabled
Google does not return anything for PermanentDeleteNotSupportedOnRootBlob
Also tried with both Signing method as Account key & User delegation key and got same error
I tried to reproduce the same in my environment.
To permanently delete blob ,
their snapshot must also be soft deleted
For that Make sure to enable versioning for blobs while creating.If already created, you can enable version from data protection configuration.
With
The blob can be deleted successfully
Otherwise one may come across 409 error.
Reference: Delete Blob (REST API) -permanent-delete Azure Storage | Microsoft Learn