I've got a situation where all the workstations in my organization are joined to Entra ID (Windows 11), and we have some on-prem VMs running Windows Server that connect to a local Active Directory. We're syncing the local AD with Entra ID through Cloud Sync, and everything is set up for single sign-on (SSO) to allow users to access local AD resources using their Entra ID credentials.
The challenge arises when trying to use mapped drives on a local server. Users often work remotely and connect to their office PCs via Remote Desktop. While I can set up mapped drives without issues when I'm logged in locally, they become inaccessible when I log in via Remote Desktop. I receive the error message "The local device name is already in use." However, if I log in locally again, I can access the mapped drive until I log out. The only workaround I've found is to map the drive while connected via Remote Desktop, which then keeps it accessible regardless of how I log in afterwards.
I've shared a video that demonstrates this issue [here](https://innercoreit.sharepoint.com/:v:/g/EUOYcR8ZoQdHq1RTAfGDDBkBMnccOMMe2KU4W-UAuAvrRw?e=bdAryr). I'm not convinced this is just a settings issue; it feels more like a bug. Has anyone else experienced this?
3 Answers
It might be worth looking into rethinking your drive mapping process entirely. It sounds like you’re using logon scripts, which could work, but I’ve had better luck with Group Policy (GPO) mappings. Just try to create fewer GPO objects and use item-level targeting for specific users. Also, if you're relying on RDP too much, consider having users take their laptops remote instead. It can help mitigate some performance issues.
Are you mapping the drives manually? Have you considered using a local Group Policy to handle that instead? I came across a resource suggesting that you should use the UNC format for mapping,
https://www.virtualizationhowto.com/2016/07/map-network-drive-remote-desktop-local-computer/
You should really consider moving away from mapped drives and use DFS-N instead. It connects on demand and won't cause the "The local device name is already in use" error since it doesn't use specific device names.
Unfortunately, a legacy line-of-business application requires using mapped drives.
The machines are Entra ID Joined, so using AD Group Policy isn't an option.