How to find the last accessed date of the file or folder in an azure file share?

Galipelly Rajashekar (Quadrant Resource LLC) 60 Reputation points Microsoft External Staff
2025-10-13T07:02:37.7833333+00:00

We are accessing the files using a shared network path configured with DFS (Distributed File System) on the VM. The target path in the DFS configuration points to an Azure File Share, where the actual data resides.

So How to find the last accessed date of the file or folder in an azure file share?

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

Answer recommended by moderator
  1. Harry Vo (WICLOUD CORPORATION) 3,490 Reputation points Microsoft External Staff Moderator
    2025-10-13T08:21:54.9566667+00:00

    Hi @Galipelly Rajashekar (Quadrant Resource LLC)

    Unfortunately, Azure File Share does not store or return the “last accessed” timestamp for files or folders. The service only maintains the following attributes:

    • CreationTime
    • LastWriteTime (Modified Time)
    • ChangeTime

    The LastAccessTime attribute is not supported in Azure Files, and it will remain empty or static even when files are opened through SMB or DFS.


    Although Azure Files does not natively support, you can enable Diagnostic Logs:

    • In your Storage Account, enable Azure Monitor Diagnostic Logs for the File service.
    • These logs capture “read” operations (such as GetFile, GetFileProperties, etc.).
    • You can then query the logs in Log Analytics to determine when a file was last accessed.

    If you think it's useful, please kindly react accordingly to our system as final answer. If you have any question, please let us know! Thank you!

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jeevan Shanigarapu 3,280 Reputation points Microsoft External Staff Moderator
    2025-10-13T12:59:42.56+00:00

    Hello @Galipelly Rajashekar,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
    I understand your question about how to find the last accessed date of the file or folder in an azure file share.

    At this time, Azure File Shares do not provide a way to track or display the “last accessed” date for files or folders. You can only view the last modified date using Azure APIs, PowerShell, or the portal.

    It supports only:

    Last Modified Date: This indicates the last time the file was modified, rather than when it was accessed or opened.

    Last Accessed Date: Not supported in Azure File Shares, unlike Azure Blob Storage, which allows access time tracking if this feature is enabled.

    Alternative Solutions

    1. Retrieve Last Modified Date: Go to Azure Portal, Storage Explorer
    2. Turn on Diagnostic Logging: Enable Azure Storage Analytics Logging or Azure Monitor to record SMB and REST operations. These logs can track read and write actions, but they don't update file properties to reflect access times.
    3. If tracking the last access is essential: Consider Azure Blob Storage, which supports access time tracking for lifecycle management.

    For more information, please refer the below links:
    Monitor Azure Files using Azure Monitor | Microsoft Learn

    Azure Storage Analytics logging | Microsoft Learn

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

    Please do not forget to "Accept the answer” and “up-vote it” wherever the information provided helps you, this can be beneficial to other community members__.__ It would be greatly appreciated and helpful to others.

    0 comments No comments

Your answer

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