Trigger on Azure File Share?

Anirud Thapliyal 96 Reputation points

We have on-premise windows network file share which we want to move to Azure. To do that we are going to use Azure File Share and mount it by mapping the drive.

Is there any trigger or event which gets invoked when a file is added to the share so that we can perform additional task once file is added like reading the content and saving its data to the Azure SQL db?

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

Accepted answer
  1. Sumarigo-MSFT 34,936 Reputation points Microsoft Employee

    @Anirud Thapliyal Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    This function isn't available yet. One option that is worth testing is to use the storage logging feature to send the logs to Event Hub and monitor when the file is closed.

    Example below is a file copy to a file share. Once the file copy completed, the file was closed.

    { "time": "2020-11-06 T20:28:02.9322274Z", "resourceId": "/subscriptions/SubID/resourceGroups/afs/providers/Microsoft.Storage/storageAccounts/SAName/fileServices/default", "category": "StorageWrite", "operationName": "Close", "operationVersion": "3.0", "schemaVersion": "1.0", "statusCode": 0, "durationMs": 5, "callerIpAddress": "IP Address", "correlationId": "35f******1d-00ce-001e-91****00", "identity": {"type":"NTLMv2"}, "location": "West US", "properties": {"accountName":"SAName","etag":"0x8d85f3601523d96","serviceType":"file","lastModifiedTime":"2020/11/06 20:28:02.7964822","serverLatencyMs":5,"operationCount":0,"requestHeaderSize":64,"requestBodySize":24,"responseHeaderSize":64,"responseBodySize":112,"smbSessionId":10151588549518950453,"smbTreeConnectID":5,"smbPersistentHandleID":153771048971,"smbVolatileHandleID":18446744069414584357,
    "smbCreditsConsumed":1,"smbMessageID":927,"smbCommandMajor":6,"smbCommandMinor":"FileClose","smbCommandDetail":"Detail=Client","smbFileId":9223503153616388096}, "uri": "\\\afs-westus\StorageSyncAgent_WS2016.msi", "protocol": "SMB", "resourceType": "Microsoft.Storage/storageAccounts/fileServices"}

    If you wish you may vote 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: A workaround could be to use schedule trigger to trigger your pipeline on scheduled intervals.

    We are looking into this feature. If there is any update you can refer Azure updates for New features and updates (Get the latest updates on Azure products and features to meet your cloud investment needs. Subscribe to notifications to stay informed.)

    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 “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,011 Reputation points

    Trigger for Azure file share is not available at this moment.

    I guess, you can schedule a pipeline / job to run after some interval to load file data to SQL.

    Do consider upvoting the below feedback.

    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    1 person found this answer helpful.