Access on-premise File Share when in the Office and Azure File Share when outside

Tobias 1 Reputation point
2022-12-07T16:07:15.507+00:00

Hi there,

I just set up an entire domain network from scratch for our sub department.

So there is a Windows Server 2022 with Fileserver Role installed. I've also created an Azure Storage Account and made a Fileshare in that. They already had an M365 Tenant so I just connected that together. The users are synced with Azure AD Connect. The Fileshares are synced with Azure File Sync. Theres also a connection to the local AD to sync permissions.
This is already working fine.

I can access the file share on-premise and the file share in Azure.

Now I want something like an intelligent network share that automatically connects to the on-premise Fileserver when the client is in the Office network and connects to Azure Files if it's anywhere else.
I tried with CNAME (seen the hint that this is not best practice anymore), but failed.

Is there a nice way to do that or do I have to write a logon-script which will do this task? I don't really want to use a login-script anymore but if this is the only way...

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,170 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SaiKishor-MSFT 17,201 Reputation points
    2022-12-13T22:08:59.973+00:00

    @Tobias Thank you for your patience while we were looking into your issue. I received the following suggestion from our internal team regarding your use case-

    This could be accomplished using DFS Namespaces. However, we don't recommend this scenario currently. All users should either directly access the Azure file share or access the share from Windows Server(s) that have the Azure File Sync agent installed. The reason is that we don’t have change tracking in Azure Files today. So if a user makes a change directly in the Azure file share, it will take over 24 hours to sync the change to the Windows Servers. In addition to the delay in syncing files to the server, if a file is modified in the Azure file share and the same file is modified on the server (before the file update in the Azure file share is synced to the server), it will result in a file conflict.

    Hope this is helpful! Please let us know if you have any more questions and we will be glad to assist you further. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.


  2. Tobias 1 Reputation point
    2023-02-03T09:09:34.3133333+00:00

    Converted to comment.

    0 comments No comments