az storage account or-policy delete will not implement the DeleteContainerOrsPolicy operation, so the destination could not update after delete the policy
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
after delete the object replication policy by [az storage account or-policy delete] command
the blobs in the destination container could not been modified.
below error will be reported.
Failed to upload 1 out of 1 blob(s):
overwrite.txt: The request is rejected because of object replication policy.
https://learn.microsoft.com/en-us/cli/azure/storage/account/or-policy?view=azure-cli-latest#az-storage-account-or-policy-delete
### Related command
az storage account or-policy list --account-name dansrc --query "[].{policyId: policyId, rules: rules[].{ruleId: ruleId, sourceContainer: sourceContainer,destinationContainer:destinationContainer}}"
policy id found by above command
az storage account or-policy delete --account-name dansrc --policy-id 52cc7032-b511-49cd-a541-84073c0799c2
### Errors
below error will be reported.
Failed to upload 1 out of 1 blob(s):
overwrite.txt: The request is rejected because of object replication policy.
### Issue script & Debug output
az storage account or-policy delete --account-name dansrc --policy-id 11eed4bb-2b7f-44d4-a015-0dc9c1d03ecf
the command itself didn`t report any error message
### Expected behavior
after delete the policy rule, the destination container should be modifiable.
### Environment Summary
C:\Users\danliu1>az --version
azure-cli 2.81.0
core 2.81.0
telemetry 1.1.0
Extensions:
databox 1.2.0
eventgrid 1.0.0b2
Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\danliu1\.azure'
Extensions directory 'C:\Users\danliu1\.azure\cliextensions'
Python (Windows) 3.13.9 (tags/v3.13.9:8183fa5, Oct 14 2025, 14:09:13) [MSC v.1944 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
### Additional context
after checking the diagnostics of the destination blob storage, and compare with delete the policy from Azure Portal.
we found we delete the policy by az cli, the operation DeleteContainerOrsPolicy will not been run.
that is why the destination container could not been modified .
Contributor guide
Assessment
This issue has not been assessed yet.