question

aarthir-6538 avatar image
0 Votes"
aarthir-6538 asked Sumarigo-MSFT commented

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

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-logic-appsazure-storage-accountsazure-blob-storageazure-storage-explorer
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Sumarigo-MSFT avatar image
0 Votes"
Sumarigo-MSFT answered Sumarigo-MSFT commented

@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.



· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@aarthir-6538 Just checking in to see if the above answer helped. If this answers your query, please don’t forget to "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·

@aarthir-6538 Just checking in to see if the above answer helped. If this answers your query, please don’t forget to "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.


0 Votes 0 ·

@aarthir-6538 Just checking in to see if the above answer helped. If this answers your query, please don’t forget to "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

0 Votes 0 ·