Unable to delete blob with 0B size in logic app with Lease state as Leased

aarthi r 1 Reputation point
2020-06-19T07:07:39.443+00:00

Facing issue while deleting the azure storage blob with 0 Byte size which has the lease state as "Leased". While creating the blob it automatically creates with the Leased state only when the size is 0, whereas when the size is more that 0 Bytes the state is "Available" and the deletion of blob is not an issue.
We are able to delete the 0 Byte file after a minute when the state changes to "Expired" but I have a scenario where the deletion should happen immediately.

Error obtained during deletion of blob
{
"status": 412,

"error": {
"message": "There is currently a lease on the blob and no lease ID was specified in the request."
},

Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
241 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,906 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,609 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,981 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 45,406 Reputation points Microsoft Employee
    2020-06-22T10:51:15.367+00:00

    @aarthir-6538 Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    There is an alternate way to break a lease if you use (or download) Microsoft Azure Storage Explorer (a really wonderful tool to manage Azure Storage).

    You can browse to the Storage Account and find the relevant file and then select the Break Lease option.

    However Azure Blob API support breaking the lease

    https://msdn.microsoft.com/en-us/library/azure/ee691972.aspx

    The article has a Powershell script to unlock the lease of the blob files

    https://msdn.microsoft.com/en-us/library/jj919145.aspx?f=255&MSPPError=-2147217396

    Additional information: You can also refer to this articles which gives you more idea on your scenario.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to "Accept the answer" and upvote wherever the information provided helps you, this can be beneficial to other community members.


  2. Anand Deo 21 Reputation points
    2022-07-16T05:04:29.16+00:00

    @aarthi r Login to Azure account with owner profile and try to access the containers & storage account.
    Delete the data from Azure platform if not data is not being deleted from mounted machine.

    0 comments No comments