I set up a private Azure Files share using Entra ID authentication and private access only. My Windows 11 25H2 workstation is Entra ID joined and reaches Azure through a point-to-site VPN. I mapped the share as \xxxxxstorage01.file.core.windows.netapps, both through File Explorer and PowerShell. When the VPN is disconnected and the share cannot be reached, File Explorer repeatedly shows "Not Responding" and becomes almost unusable. Connecting to the VPN immediately fixes the problem. I reproduced the issue after reinstalling Windows. Has anyone found a reliable way to prevent Explorer from locking up, or to map the drive only when the VPN connection is available?
4 Answers
This behavior has also been reported with other Windows file shares, not just Azure Files. It can be especially disruptive in virtual desktop sessions because the Explorer process may affect the whole user session. Conditional drive mapping, with a matching logoff or disconnect cleanup script, is generally safer than an always-present mapping.
The practical workaround is not to keep the drive permanently mapped. Map it only after the VPN connects, and remove the mapping when the VPN disconnects or the user signs out. A script triggered by the VPN connection or a relevant Windows event can handle that. Explorer is trying to access the mapped location because Windows believes it should be available, so it keeps retrying when there is no network path.
If the workflow supports it, SharePoint or another service that is designed for intermittent connectivity may avoid this particular mapped-drive problem. It won’t replace Azure Files for every application, but it can be a cleaner option for user-accessed documents.
Instead of assigning a drive letter, add the share as a shortcut under Network locations or use a normal shortcut to the UNC path. That avoids advertising an unavailable drive to Explorer and is usually less disruptive when the VPN is disconnected.

That makes sense as a workaround, although ordinary on-premises file servers usually time out and return an error instead of leaving Explorer unusable. I’m looking into a scheduled task or event-triggered script that maps the share when the VPN connects.