How to get access time of files under Azure file share?

Xie, Tina 0 Reputation points
2024-07-22T19:06:50.2766667+00:00

We are trying to implement a custom archiving and restore solution for Azure files. One of archiving condition is checking if files that have not been accessed for 2 years. But I am facing challenge of retrieving access time of files.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,301 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Marcin Policht 25,755 Reputation points MVP
    2024-07-22T19:26:17.5633333+00:00

    This is not available yet - https://learn.microsoft.com/en-us/answers/questions/1624926/azure-file-share-optimization-how-to-filter-files


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Sumarigo-MSFT 47,021 Reputation points Microsoft Employee
    2024-07-23T14:07:26.58+00:00

    @Xie, Tina Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    Presently, It's not possible for Azure File share,
    Workaround: Last modified date is the only alternative that is available.
    If you wish you may leave your feedback  here. All the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.

    Additional information :
    In general, if you want to track the last access time of the blob, you can enable the last access time tracking feature on the account level.
    Optionally enable access time tracking

    Once enabled, and you try to check the properties, this shall provide you the last access time of the blob.

    Moving ahead, in order to track operation on the storage account, you can rely on the storage diagnostic logging. Since you will be using the SAS token, it won't be logging any user specific details and only log SAS as the authentication scheme. You can narrow down the search based on user agent, client IP and request URL (blob name).

    Monitor Azure Blob Storage
    Best practices for monitoring Azure Blob Storage

    Below is a sample blog for reference on the concept. You can apply the same approach to the newer diagnostic logging as well.
    Leveraging Storage Analytics Logs to analyze who accessed the Storage Account

    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members


  3. KarishmaTiwari-MSFT 20,207 Reputation points Microsoft Employee
    2024-07-29T23:46:59.2033333+00:00

    As of now, the lifecycle management feature for Azure Files is not yet available. You can request for this feature by providing feedback here: https://feedback.azure.com/d365community/forum/a8bb4a47-3525-ec11-b6e6-000d3a4f0f84

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.