Yes. For Azure AD–joined devices managed by Intune, a non-domain-joined file server can still be mapped as a network drive by using a common local account on the server and deploying a script or configuration via Intune.
Key points and options:
- Basic requirement
- The file server must expose an SMB share and be reachable over the network (IP or DNS name).
- A local account on the server (for example,
filesvc) with permissions on the share will be used by all 8 users.
- Map the share with
net use and explicit credentials
Use a script that runs in the user context on each Azure AD–joined device, for example:
net use Z: \\FILESERVER\ShareName /user:FILESERVER\filesvc P@ssw0rd /persistent:yes
Notes:
-
FILESERVER is the server’s NetBIOS name or IP.
-
filesvc is a local account on the server.
-
/persistent:yes reconnects at logon.
- Deploy via Intune (PowerShell script)
- Create a PowerShell script in Intune that runs in the user context and calls
net use:
$driveLetter = 'Z:'
$sharePath = '\\FILESERVER\ShareName'
$username = 'FILESERVER\filesvc'
$password = 'P@ssw0rd'
# Remove existing mapping if present
if (Get-PSDrive -Name $driveLetter.TrimEnd(':') -ErrorAction SilentlyContinue) {
net use $driveLetter /delete /y
}
net use $driveLetter $sharePath /user:$username $password /persistent:yes
- Assign the script to the Azure AD user group that contains the 8 users.
- Alternative: Map without a fixed drive letter
Some apps work better with UNC paths. You can also map without a fixed letter:
net use * \\FILESERVER\ShareName /user:FILESERVER\filesvc P@ssw0rd
- Security considerations
- A single shared credential is simple but less secure and not auditable per user.
- Store credentials securely (for example, using Intune’s script obfuscation and limiting script assignment only to the required users). Avoid hard-coding passwords in scripts where possible.
- If the server were Azure Files instead of a physical file server
- Azure Files supports mapping via
net use from Azure AD–joined devices using identity-based authentication or storage account keys. The same net use approach applies, but the UNC path would be:
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName>
with credentials as described in the Azure Files documentation.
References: