Azure Files supports managed-identity SMB access from Entra-joined-only Windows Azure VMs, provided the VM is not also AD DS or Entra Domain Services domain-joined and is prepared with the Azure Files SMB Managed Identity Client.^1^
Supported configuration
The supported Windows configuration requires:
- Windows Server 2019 or later.
- A system-assigned or user-assigned managed identity on the VM; using only one is recommended.
- No AD DS or Entra Domain Services domain join. Microsoft Entra join by itself is compatible with this requirement.
- Managed Identity for SMB (
SMBOAuth) enabled on the storage account.
- Kerberos enabled in the storage account’s SMB security settings.
- An appropriate Azure Files data-plane RBAC role assigned to the managed identity.
- PowerShell 5.1 or later and the
AzFilesSmbMIClient module installed on the VM.^1^
This capability is generally available and supports application identities and end-user identity access on the same storage account.^2^
- In the Azure portal, open Storage account → Settings → Configuration.
- Set Managed Identity for SMB to Enabled, then select Save.
- Ensure the SMB security profile permits Kerberos authentication.
- Enable either a system-assigned or user-assigned identity on the VM.
- Assign that identity the required Azure Files data-plane RBAC role at the share or storage-account scope.
- On the VM, open an elevated PowerShell session and install the client:
Install-Module AzFilesSmbMIClient
Import-Module AzFilesSmbMIClient
Get-ExecutionPolicy -List
# Run only if CurrentUser is Restricted or Undefined:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- Initialize credentials using the complete file-service endpoint, including its trailing slash:
# System-assigned identity
AzFilesSmbMIClient.exe refresh `
--uri https://<storage-account-name>.file.core.windows.net/
# User-assigned identity
AzFilesSmbMIClient.exe refresh `
--uri https://<storage-account-name>.file.core.windows.net/ `
--clientId <managed-identity-client-id>
The refresh operation obtains an OAuth token, inserts the corresponding credential into the Kerberos cache, and automatically refreshes it when it approaches expiration.^1^
Use the UNC path in applications, for example:
\\<storage-account-name>.file.core.windows.net\<share-name>\folder
A drive letter is normally tied to a logon session and therefore should not be assumed visible to a Windows service or IIS worker process.
Windows services and IIS application pools
The available product documentation does not establish that credentials initialized by running AzFilesSmbMIClient.exe refresh interactively are machine-wide or automatically available to:
-
LocalSystem, NetworkService, or another service identity;
- a custom Windows service account;
- an IIS application-pool virtual identity; or
- a different interactive user session.
Consequently, do not treat an interactive mount or successful access from an administrator session as proof that an IIS worker or service can use the same credential.
For a .NET IIS application, the documented integration option is the Microsoft.Azure.AzFilesSmbMI managed assembly, which provides direct access to SMB OAuth authentication functionality. Native applications can instead integrate the AzFilesSmbMIClient DLL.^1^ This is the safer design when the application must establish or maintain authentication in its own process context.
The local service or app-pool account is not the Azure RBAC principal in this model—the VM’s managed identity or selected user-assigned identity is. Local file permissions alone therefore do not grant Azure Files access.
Reboots and credential renewal
The client documents automatic renewal after refresh has initialized the credential, but the available documentation does not state that this initialization survives a VM reboot or that the refresher starts automatically after boot.^1^
Until reboot behavior is explicitly confirmed for the installed client version:
- Do not assume the credential persists across restarts.
- For IIS/.NET, prefer application-level integration so authentication is initialized when the application starts.
- For a general Windows service, validate access after reboot under the service’s actual logon identity—not from an administrator session.
- If application integration is unavailable, obtain confirmation from Microsoft Support before deploying an automated startup task, because the required session and security context are not specified in the published procedure.
This managed-identity method is distinct from Microsoft Entra Domain Services authentication, whose normal workflow requires a managed-domain join and domain-controller connectivity.^3^
References
- Access SMB Azure file shares by using managed identities with Microsoft Entra ID (windows)
- What's new in Azure Files and Azure File Sync
- Enable Microsoft Entra Domain Services authentication on Azure Files