How to delete automatically generated containers in storage account?

AnjuSharma-7416 1 Reputation point
2022-10-06T18:08:05.197+00:00

I have a LogicApps workflow that is generating automatic containers in the storage account every time the job runs. One of the suggestions I saw said that this can be done through ADF. The issue is that the names of these containers are completely random - so there is no way for me to filter them based on a certain prefix or suffix. Example name: 26e37727-4666-4f09-8595-2e83d9d427f4.

How can I delete these automatically generated containers from the storage account? Also, would anyone happen to know why these empty containers may be generating automatically?

248261-containers-names.png

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,996 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Carlos Solís Salazar 17,791 Reputation points MVP
    2022-10-07T00:53:42.103+00:00

    Hi @AnjuSharma-7416

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    You can Configure a lifecycle management policy in your Storage Account and delete the data after N days.

    Also I found this document which may help you: https://techcommunity.microsoft.com/t5/azure-paas-blog/delete-all-the-azure-storage-blob-content-before-n-days-using/ba-p/838870

    Hope this helps!

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.


  2. JananiRamesh-MSFT 24,111 Reputation points
    2022-10-10T13:40:03.153+00:00

    Hi @AnjuSharma-7416 Thanks for reaching out. You can use azure automation to scan the containers in your storage account and delete them periodically. please refer this sample blog to implement the same https://blog.sqlserveronline.com/2018/07/04/powershell-azure-automation-delete-older-containers-azure-storage-account/

    let me know if you need any additional assistance, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.