Post

Mapping On-Prem File Shares with Entra ID Only

Mapping On-Prem File Shares with Entra ID Only
Field-tested runbook

Mapping On-Prem File Shares with Entra ID Only

No on-prem Active Directory. No Kerberos KDC. Just a Windows Server 2025 box, Azure Arc, and a decades-old authentication protocol most people have forgotten exists. Here's the fully validated, step-by-step build — including the lab evidence that proves it actually works.

Azure Arc Microsoft Entra ID PKU2U Windows Server 2025 Azure Files Azure File Sync Intune
Storage account: datasharetesting Tenant model: cloud-only Entra ID Status: Lab-validated ✅
🔄 Azure File Sync
🔑 Entra Kerberos
🔐 PKU2U (on-prem only)
☁️ Azure Files datasharetesting
🖥️ On-Prem Server Arc-connected, no domain
💻 Windows 11 Users Entra-joined, cloud-only

Same files everywhere: users reach Azure directly over Entra Kerberos, reach the on-prem server directly over PKU2U when they're on that network, and Azure File Sync quietly keeps the server and the cloud share identical in the background.

1Architecture Overview

Three pieces work together so that both on-prem-reachable and fully remote users can get to the same data — without a domain controller anywhere in the picture.

① Users who can reach the on-prem network
💻
Windows 11
Intune-managed, cloud-only
🔐PKU2U + Entra ID
no domain, no KDC — validated
🔐
PKU2U + Entra ID
no domain, no KDC — validated
🏢
AZ-Filez-01
On-prem server · sharetesting2
② Users who cannot reach the on-prem network
💻
Windows 11
Intune-managed, cloud-only
🔑Entra Kerberos
standard, Microsoft-supported
🔑
Entra Kerberos
standard, Microsoft-supported
☁️
Azure Files
sharetesting2 · synced copy
③ All users — separate, always-cloud share
💻
Windows 11
Intune-managed, cloud-only
🔑Entra Kerberos
standard, Microsoft-supported
🔑
Entra Kerberos
standard, Microsoft-supported
☁️
Azure Files
sharetesting · primary share
Behind the scenes — keeping both copies identical
🏢
AZ-Filez-01
Local folder: sharetesting2
🔄Azure File Sync
HTTPS 443, continuous
🔄
Azure File Sync
HTTPS 443, continuous
☁️
Azure Files
sharetesting2 · cloud endpoint
☁️

sharetesting

Direct Azure Files access for cloud-only Windows 11 devices. Mapped via Intune, authenticated with Entra Kerberos. No server involved.

🏢

AZ-Filez-01

Non-domain-joined Windows Server 2025, connected to Azure Arc. Local sharetesting2 share reachable via PKU2U + Entra ID — no AD, no Kerberos KDC. Lab-validated below.

🔄

sharetesting2 (Azure)

A File Sync cloud endpoint mirroring the server's local share, so users who can't reach the on-prem box get the same data straight from Azure.

2Part 1 — On-Prem Access via Azure Arc + PKU2U

This is the interesting part: mapping a drive to a server with zero Active Directory, using an authentication protocol most admins have never had a reason to touch.

Prerequisites

RequirementDetail
Server OSWindows Server 2025, not domain-joined (workgroup)
Server connectivityConnected to Azure Arc (azcmagent connect)
ExtensionAADLoginForWindows deployed to the Arc machine — Entra-joins the server (does not by itself enable SMB auth)
Tenant matchServer and client must be Entra-joined to the same tenant
ClientWindows 11, Entra-joined (cloud-only), Intune-managed
Name resolutionReal DNS or hosts entry — PKU2U does not work against a bare IP

How it actually works

AADLoginForWindows only handles interactive/RDP sign-in via Azure RBAC (VM Administrator/User Login roles) — it registers nothing in the SMB stack. What actually authorizes a mapped drive with no domain and no Kerberos KDC is:

  • PKU2U (Negotiate SSP NegoExtender) — lets two Entra-joined, non-domain machines authenticate an SMB session using online (Entra) identities.
  • NTFS ACLs keyed to Entra identities (AzureAD\<upn>) — authorization is still local NTFS; there's no Azure RBAC governing file-level access on a self-hosted server, unlike Azure Files.
⚠️
Support status This combination (Arc + AADLoginForWindows + PKU2U for SMB) is not an officially documented, supported Microsoft workflow — it's an engineered combination of supported building blocks. Treat as validated-in-lab, not vendor-guaranteed. If the server must later join an on-prem AD domain, this entire path is unavailable.

Setup steps

Connect the server to Azure Arc and deploy AADLoginForWindows

Confirm the join state before doing anything else:

dsregcmd /status
# AzureAdJoined : YES / DomainJoined : NO

Enable PKU2U on both the server and every Windows 11 client

New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\pku2u" -Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\pku2u" -Name "AllowOnlineID" -Value 1 -Type DWord

Deploy this to Windows 11 clients at scale via Intune → Settings Catalog rather than by hand.

Create the share and folder on the server

New-Item -Path "C:\Shares\sharetesting2" -ItemType Directory -Force
New-SmbShare -Name "sharetesting2" -Path "C:\Shares\sharetesting2" -FullAccess "Everyone"

Share permissions are left open — access is controlled entirely by NTFS ACLs in the next step (standard pattern).

Grant NTFS access to each Entra identity that needs it

icacls "C:\Shares\sharetesting2" /grant "AzureAD\<user-upn>:(OI)(CI)M"

Confirm resolution — icacls should show the resolved display name, not a raw SID:

icacls "C:\Shares\sharetesting2"

Map the drive from a Windows 11 client

Via Intune drive-mapping policy/script:

net use Z: \\az-filez-01\sharetesting2

Verify it authenticated via PKU2U, not NTLM or domain Kerberos

Get-SmbConnection

UserName/Credential should show AzureAD\<DisplayName>. On the server's Security event log, filter 4624 events and check AuthPackage — expect NegoExtender (this is how PKU2U-based logons are labeled in the LSA).

3Part 2 — Bridging to Azure Files with Azure File Sync

Gives the same data a second access path — directly from Azure — for users who can't reach the on-prem server over the network.

ItemValue
Storage accountdatasharetesting (existing)
Azure file share (cloud endpoint)sharetesting2 — same name as the local server share, for clarity
Server endpoint (local path)C:\Shares\sharetesting2 on AZ-Filez-01
Cloud tieringDisabled — full local copy always kept on the server
RegionStorage Sync Service in the same region as datasharetesting
ℹ️
Azure File Sync is a separate mechanism from Azure Arc. It uses its own agent (Storage Sync Service + registered server), not the Arc extension from Part 1. Both can coexist on the same server.

Prerequisites

  • Outbound HTTPS 443 from the server to Azure (the sync engine uses REST calls over 443, not SMB).
  • An Azure AD account with Contributor rights on the Storage Sync Service, used once to register the server.
  • Latest Azure File Sync agent compatible with Windows Server 2025.

Setup steps

Create the cloud endpoint share

New-AzStorageShare -Name "sharetesting2" -Context (Get-AzStorageAccount -ResourceGroupName "<rg>" -Name "datasharetesting").Context

Create a Storage Sync Service

New-AzStorageSyncService -ResourceGroupName "<rg>" -Name "contoso-sync" -Location "<region>"

Install the Azure File Sync agent and register the server

Download from aka.ms/afs/agent, run the installer, and sign in interactively with the Contributor account when the Server Registration UI launches. Select the subscription, resource group, and Storage Sync Service. This creates a registered server resource in Azure — independent of the Arc connection from Part 1.

Create a Sync Group and endpoints

$syncGroup = New-AzStorageSyncGroup -ResourceGroupName "<rg>" -StorageSyncServiceName "contoso-sync" -Name "sharetesting2-syncgroup"

New-AzStorageSyncCloudEndpoint -ResourceGroupName "<rg>" -StorageSyncServiceName "contoso-sync" `
  -SyncGroupName "sharetesting2-syncgroup" -StorageAccountResourceId "<storage-account-resource-id>" -AzureFileShareName "sharetesting2"

New-AzStorageSyncServerEndpoint -ResourceGroupName "<rg>" -StorageSyncServiceName "contoso-sync" `
  -SyncGroupName "sharetesting2-syncgroup" -ServerId "<registered-server-id>" -ServerFolder "C:\Shares\sharetesting2" `
  -CloudTiering $false

Monitor the initial sync

Since the local folder already has data, Azure File Sync performs a namespace merge, uploading existing files to the new cloud endpoint. Watch Portal → Storage Sync Service → Sync Group → Server Endpoint → Health until it reads "Healthy" / "Up to date".

Enable identity-based access on the new share

Microsoft Entra Kerberos is a storage-account-level setting, so sharetesting2 inherits it automatically from datasharetesting. Assign RBAC (e.g. Storage File Data SMB Share Contributor) to the users/groups who need direct cloud access.

⚠️
NTFS ACLs set locally are expected to replicate to Azure Files as Windows ACLs once synced — verify this per file/folder after the first sync rather than assuming it.

Map the drive for users who can't reach the on-prem server

New-PSDrive -Name Y -PSProvider FileSystem -Root "\\datasharetesting.file.core.windows.net\sharetesting2" -Persist

Resulting access matrix

User groupPathMechanism
Cloud-only, on-prem network reachable\\az-filez-01\sharetesting2PKU2U + Entra ID
Cloud-only, no on-prem network path\\datasharetesting.file.core.windows.net\sharetesting2Entra Kerberos
Both groupsSame underlying dataKept in sync by Azure File Sync

4Validation Evidence

Tested and confirmed on AZ-Filez-01 — this isn't theoretical.

  • Server & client Entra-joined, same tenant
  • PKU2U enabled both ends
  • NTFS ACL resolved Entra UPN → cloud identity
  • net use succeeded, no credential prompt
  • Get-SmbConnection shows AzureAD\<user> identity
  • Server Security log 4624AuthPackage = NegoExtender (PKU2U)
  • Read + write access confirmed
  • Survives reboot (remembered mapping + manual reconnect)
  • Share permissions alone are insufficient — NTFS ACL is the real enforcement point
Proof of NTFS enforcement With share permissions set to "Everyone" but before running icacls, the mapped drive connected but dir/mkdir returned Access is denied. After granting the ACL, both succeeded immediately — no re-mapping or reboot needed. Authorization is enforced entirely by the local NTFS ACL, not the share permission list.

Still to validate

  • Negative test — a different Entra user not in the ACL is denied access
  • Intune-deployed drive mapping reproduces the same result unattended
  • Behavior after PRT refresh / longer elapsed time
  • Azure File Sync namespace merge completes cleanly and NTFS ACLs replicate as expected

5Known Prior Art / References

There is no official Microsoft Learn documentation for the Arc + PKU2U SMB file-share combination used in Part 1. Here's what exists publicly.

Anthony Fontanez — "Internet-facing File Servers, with a dash of Entra Authentication"
July 2025 · anthonyfontanez.com

Identifies PKU2U as the mechanism enabling Entra-only SMB file share access. Confirms in the comments that both an Azure-hosted Server 2022+ VM and an on-prem Arc-attached Server 2025 box were tested — but the on-prem Arc case isn't documented step-by-step, and there's no event-log-level proof (4624/NegoExtender) shown.

Mindcore — "Modern Server Management: Azure Arc RDP with Entra ID Authentication"
August 2025 · blog.mindcore.dk

Documents the Arc + AADLoginForWindows extension deployment itself, including the mdmId="" workaround needed on Arc machines. Explicitly labels the whole approach POC-only, not production-ready. Covers RDP sign-in only — no mention of PKU2U or file shares.

Microsoft Q&A thread
October 2024 · learn.microsoft.com

Microsoft support staff confirm AADLoginForWindows was not officially supported on hybrid Arc machines at that time.

💬
A reader comment on Fontanez's post (Nov 2025) describes asking multiple consultants and a Microsoft expert about mapping drives on an Entra-only tenant with no AD — none had a solution, and Microsoft was reportedly surprised the approach worked when shown it.

What appears original here: a single validated runbook combining on-prem Arc-attached WS2025, PKU2U-secured local SMB access for Intune-managed cloud-only clients, and Azure File Sync bridging the same data into Azure Files — with concrete validation evidence. This full combination, documented end-to-end with test evidence, doesn't appear to exist publicly elsewhere as of this writing.

6Risk Assessment / Long-Term Viability

Be clear-eyed about what could break this — none of it requires Microsoft to "target" the approach specifically.

RiskLikelihoodNotes
Customer security baseline disables PKU2U High Microsoft Security Baselines and CIS Benchmarks commonly recommend disabling "Allow PKU2U authentication requests to use online identities." If a baseline is applied via Intune/GPO, this can silently break the solution with zero Microsoft involvement. Check for existing baselines before deployment.
Microsoft further restricts PKU2U Medium Not unprecedented — CVE-2021-25195 already led Microsoft to change PKU2U's default posture on domain/hybrid-joined devices.
AADLoginForWindows on Arc changes behavior Medium Explicitly unsupported/POC per community sources and Microsoft support. No compatibility guarantee for an undocumented use case.
PKU2U protocol removed entirely Low Deeply embedded in Windows' Negotiate/SPNEGO stack; used elsewhere (e.g. Entra-joined-to-Entra-joined RDP).
Direction of travel is favorable Microsoft is actively investing in cloud-only auth (Entra Kerberos for Azure Files, Entra sign-in for Arc VMs) — this isn't fighting the roadmap, just ahead of official support.

Before shipping this to a customer

  • Do not present this as a Microsoft-supported architecture
  • Get written customer sign-off acknowledging the risk
  • Check for existing security baselines that touch PKU2U — the most likely failure mode
  • Define a rollback/exit plan up front (domain-join + Kerberos, or full migration to Azure Files)
  • Monitor Windows/Entra release notes as an ongoing task, not a one-time check
🚫
None of this is officially supported by Microsoft CSS. Treat it as validated-internally, not vendor-endorsed — don't expect standard Microsoft support channels to troubleshoot issues with this specific combination.

Document reflects architecture and lab results validated in a real engagement. Part 2 (Azure File Sync) should be run through the same staged validation approach as Part 1 before relying on it for production access.
This post is licensed under CC BY 4.0 by the author.