Skip to content

az storage fs directory delete using blob-endpoint do not behave the same as using account-name #32267

@jonatiao

Description

@jonatiao

Describe the bug

Hierarchical namespace is enabled.

I have the following structure:
az storage blob list -c '$web' -o tsv --query "[].name" --account-name azjonathanteste --auth-mode login assets assets/config assets/config/assets.js index.html nivel0.js unstable unstable/assets unstable/assets/nivel2.js unstable/nivel1.js unstable/sr unstable/sr/nivel2.js unstable/sr/other unstable/sr/other/dir unstable/sr/other/dir/nivel4.js

when I run the az storage fs directory delete with account-name it works fine:

`az storage fs directory delete --name 'unstable' -f '$web' --account-name azjonathanteste -y --auth-mode login

{
"continuation": null,
"date": "2025-10-15T19:30:08+00:00",
"deletion_id": "134050302090974368",
"request_id": "db23bc76-a01f-0064-470a-3e1f16000000",
"version": "2021-08-06"
}`

If I run using --blob-endpoint, it does not. It says the dir is not empty:

`az storage fs directory delete --name 'unstable' -f '$web' --blob-endpoint https://azjonathanteste.blob.core.windows.net -y --auth-mode login

This operation is not permitted on a non-empty directory.
RequestId:97f14d92-001e-0020-3509-3e9529000000
Time:2025-10-15T19:25:39.1511180Z
ErrorCode:DirectoryIsNotEmpty`

Related command

az storage fs directory delete --name 'unstable' -f '$web' --account-name azjonathanteste -y --auth-mode login
az storage fs directory delete --name 'unstable' -f '$web' --blob-endpoint https://azjonathanteste.blob.core.windows.net -y --auth-mode login

Errors

This operation is not permitted on a non-empty directory.
RequestId:97f14d92-001e-0020-3509-3e9529000000
Time:2025-10-15T19:25:39.1511180Z
ErrorCode:DirectoryIsNotEmpty

Issue script & Debug output

Provided above.

Expected behavior

I expect the commands to behave the same. Delete recursively a directory.

Environment Summary

azure-cli 2.78.0

core 2.78.0
telemetry 1.1.0

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/az/bin/python3'
Config directory '/home/jonatiao/.azure'
Extensions directory '/home/jonatiao/.azure/cliextensions'

Python (Linux) 3.13.7 (main, Oct 9 2025, 05:49:51) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storageact-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions