Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.1.3.3. Configure Identity-Based Access for Azure Files

3.1.3.3. Configure Identity-Based Access for Azure Files

💡 First Principle: A file share should know who is connecting, not just which key they hold. Identity-based access replaces the all-powerful storage account key with the same two-layer model a Windows file server uses: a gate at the share, then NTFS permissions on every folder and file.

Scenario: A company is retiring an on-premises Windows file server and moving its department shares to Azure Files. Users must keep signing in with their existing domain accounts, the Finance folder must stay readable only by Finance, and no one outside the storage team may ever see the storage account key.

What It Is: Identity-based authentication for Azure Files lets users and applications reach SMB file shares with Kerberos. The client gets a Kerberos ticket from an identity source and presents it to Azure Files, which never receives the user's password. It costs nothing extra. NFS shares don't support identity-based authentication.

Choose One Identity Source: You can enable only one identity source per storage account, and it applies to every file share in that account. All three require Kerberos to be allowed in the account's SMB security settings.

Identity sourceBest fitWhat clients need
On-premises AD DSAn existing Active Directory, with identities synced to Microsoft Entra IDNetwork line of sight to the domain controllers (on-premises or on Azure VMs)
Microsoft Entra Domain ServicesA managed domain in AzureJoined to the managed domain; non-Azure clients can't join it
Microsoft Entra KerberosMicrosoft Entra joined or hybrid joined clients, FSLogix profiles, clients with no domain controller connectivityMicrosoft Entra ID issues the Kerberos ticket, so no line of sight to a domain controller is needed. For hybrid identities, AD DS must still exist and be synced

Microsoft Entra Kerberos can also authenticate cloud-only identities, with file and directory permissions managed from the Azure portal; macOS client support is in preview. Changing the identity source later is supported, but it interrupts identity-based access to every share in the account while you switch.

Layer 1: Share-Level Permissions (Azure RBAC): After the identity source is enabled, nobody can open a share until they have a share-level permission. You assign it to the Microsoft Entra identity (for a hybrid user, the synced Entra account), usually scoped to the file share:

Built-in roleGrants
Storage File Data SMB Share ReaderRead access to files and directories
Storage File Data SMB Share ContributorRead, write and delete
Storage File Data SMB Share Elevated ContributorRead, write, delete and modify ACLs
Storage File Data SMB AdminAdmin access over SMB, including taking ownership with takeown to fix ACLs, without the account key

Share-level role changes usually take effect within 30 minutes, so wait before testing a mount.

The default share-level permission is the alternative: one role applied to all authenticated identities on every share in the account. It starts as None. Use it when AD DS can't be synced to Microsoft Entra ID, when it is synced to a different tenant, for computer accounts (which have no Entra identity and so can't get RBAC roles), or when you want NTFS to do all the work. If a user has both a specific role and the default permission, the higher of the two applies.

Layer 2: Directory and File-Level Permissions (Windows ACLs): Windows ACLs, also called NTFS permissions, control what a user can do inside the share, down to a single file. For AD DS and Entra Domain Services, set them from a Windows client with File Explorer or icacls after mounting the share with admin-level access. Microsoft recommends mounting with the Storage File Data SMB Admin role rather than the storage account key. With Microsoft Entra Kerberos you can also set them in the Azure portal.

How the two layers combine: Every access checks both, and the most restrictive one wins. Share Reader plus NTFS Full Control means read only; Share Contributor plus NTFS Read means read only as well. With no share-level role at all, access is denied whatever the ACLs say.

Network Prerequisite: Port 445: SMB uses TCP port 445, which many internet providers and corporate networks block outbound. When on-premises or remote clients can't mount the share, carry the traffic through a point-to-site or site-to-site VPN or ExpressRoute private peering to a private endpoint, or use SMB over QUIC on an Azure File Sync cache server.

Practical Implementation: Enable Microsoft Entra Kerberos and Assign Share Access with Azure CLI
# Enable Microsoft Entra Kerberos as the account's identity source
az storage account update --name contosofiles --resource-group rg-files \
  --enable-files-aadkerb true

# Give the Finance group read/write/delete at the share level
az role assignment create \
  --role "Storage File Data SMB Share Contributor" \
  --assignee <finance-group-object-id> \
  --scope "/subscriptions/<sub-id>/resourceGroups/rg-files/providers/Microsoft.Storage/storageAccounts/contosofiles/fileServices/default/fileshares/finance"

# Or: apply one role to every authenticated identity on every share
az storage account update --name contosofiles --resource-group rg-files \
  --default-share-permission StorageFileDataSmbShareReader

For AD DS the equivalent switch is --enable-files-adds true (plus the domain properties), and for Microsoft Entra Domain Services it is --enable-files-aadds true. In the portal, open the storage account's Classic file shares page (under Data storage) and select Identity-based access.

Visual: Two Gates for Every File Request

⚠️ Common Pitfall: Granting NTFS Full Control and forgetting the share-level role. The user is still denied, because the share-level role is the gatekeeper and "no role" means no access.

⚠️ Exam Trap: A user who can read but not save is almost never an NTFS problem alone: check the share-level role. Storage File Data SMB Share Reader caps the user at read no matter how generous the ACL is, and only Elevated Contributor (or SMB Admin) lets users change ACLs.

Key Trade-Offs:
  • Granularity vs. Simplicity: Per-user or per-group RBAC roles give the tightest control; a default share-level permission is simpler and avoids the sync requirement, but treats every authenticated identity the same at the share layer.
  • Reach vs. Infrastructure: AD DS and Entra Domain Services need domain controller connectivity; Microsoft Entra Kerberos removes that dependency for Entra joined clients.

Reflection Question: A user holds Storage File Data SMB Share Elevated Contributor on a share but can only read one particular folder. Which layer would you inspect next, and why can't the RBAC role override it?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•22 professional certifications earned