Skip to content

[Reference feedback]: az storage share-rm delete behaviour #32732

@v-fcapra

Description

@v-fcapra

Type of issue

Other (describe below)

Reference command name

az storage share-rm delete

Feedback

Hello team,

I'm not sure if this is a documentation issue or an unexpected behavior related to command az storage share-rm delete when used to delete snapshots.

Example:

Resource type Name
Storage account saname
File share fsname
Snapshot 2026-01-30T11:06:35.0000000Z

If you run this command and the snapshot does not exist, you get an error:

az storage share-rm delete --include snapshots -g "rg" --storage-account "saname" --name "fsname" --snapshot "2026-01-30T11:06:35.0000000Z"

(ShareSnapshotNotFound) The specified share snapshot was not found.
RequestId: xxx
Time:2026-02-02T10:14:13.0557654Z
Code: ShareSnapshotNotFound

Which is expected as the snapshot no longer exist.

Now, if we pass an incorrect file share name (testfswrongname), the operation finish successfully without showing any error or output:

az storage share-rm delete --include snapshots -g "rg" --storage-account "satestcasesnapshot" --name "testfswrongname" --snapshot "2026-01-30T11:06:35.0000000Z"

This can be reproduced at will

This last behavior is consistent to what it is explained in the documentation for a different command (az storage share delete), which states this:

https://learn.microsoft.com/en-us/cli/azure/storage/share?view=azure-cli-latest#az-storage-share-delete

If the share does not exist, the operation fails on the service. By default, the exception is swallowed by the client. To expose the exception, specify True for fail_not_exist.

This is not mentioned in the documentation of az storage share-rm delete and the command does not have the parameter --fail-not-exist:

https://learn.microsoft.com/en-us/cli/azure/storage/share-rm?view=azure-cli-latest#az-storage-share-rm-delete

Is it possible to update the documentation of az storage share-rm delete to mention this behavior? (or in the future, adding a similar feature like --fail-not-exist)

Thanks!

Page URL

https://learn.microsoft.com/en-us/cli/azure/storage/share-rm?view=azure-cli-latest#az-storage-share-rm-delete

Content source URL

No response

Author

No response

Document Id

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamDocumentationStorageaz storageact-codegen-extensibility-squadneeds-triageThis is a new issue that needs to be triaged to the appropriate team.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