Identity-Based Access for Azure Files
30-second answer
Identity-based access lets users mount Azure SMB file shares with their own sign-in instead of the storage account key. First enable one identity source on the account: on-premises AD DS, Microsoft Entra Domain Services, or Microsoft Entra Kerberos (for hybrid identities on Entra-joined devices). Then grant share-level permissions with Azure RBAC roles (Storage File Data SMB Share Reader, Contributor or Elevated Contributor) or a default share-level permission for all authenticated identities. Finally, Windows ACLs (NTFS permissions) control access to directories and files.
Simulate it » No Azure account neededExam objective: 2.1.5 Configure identity-based access for Azure Files. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>File shares</strong>. *Identity-based access* says <strong>Not configured</strong>, so users can only mount with the account key. Select it.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open File shares. Identity-based access says Not configured, so users can only mount with the account key. Select it.
- Pick one identity source. Hybrid users signing in to Entra-joined PCs suit Microsoft Entra Kerberos: no domain controller line of sight needed.
- Tick Microsoft Entra Kerberos. Domain name and GUID are optional; add them if admins will set Windows ACLs from File Explorer.
- Share-level access is Azure RBAC. Open the hr-share share, then Access control (IAM) → + Add → Add role assignment.
- HR staff need read and write: Storage File Data SMB Share Contributor. Elevated Contributor also lets people change ACLs.
- Assign it to the HR-Staff group. Hybrid identities must exist in Microsoft Entra ID for this to work.
- Last layer: Windows ACLs on folders and files still apply. Users mount with net use Z: \\stcontosoprod.file.core.windows.net\hr-share over TCP port 445, and no key is involved.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Three ways in, plus one for file shares
Callers prove who they are with an account key (full control), a SAS (limited rights for limited time) or a Microsoft Entra ID token checked against RBAC data roles. For SMB file shares, users bring a Kerberos ticket from AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
🤔 What happens if…
Read this tour as text
- The front door: the storage firewall. Every account has a public endpoint that accepts all networks by default. Set the default action to Deny and only what you list gets in: virtual network rules (subnets with the Microsoft.Storage service endpoint), IP rules (public addresses only) and trusted Azure services if you tick the exception.
- Three ways in, plus one for file shares. Callers prove who they are with an account key (full control), a SAS (limited rights for limited time) or a Microsoft Entra ID token checked against RBAC data roles. For SMB file shares, users bring a Kerberos ticket from AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
- SAS tokens and stored access policies. A service SAS can point at a stored access policy on the container (up to 5 per container). The policy holds the permissions and expiry, so deleting or editing it revokes every SAS that names it. An ad hoc SAS can only be revoked by regenerating the key that signed it.
- Rotate access keys. Each account has two keys so you can rotate without downtime: move apps to key2, regenerate key1, and next time do the reverse. A key expiration policy flags old keys. Regenerating a key kills every SAS signed with it.
- Encryption at rest. Azure Storage always encrypts data with AES-256. By default Microsoft manages the key. With a customer-managed key in Key Vault (soft delete and purge protection on), the account’s managed identity wraps and unwraps its data key with your key, and you can revoke it.
- Redundancy and a region outage. LRS keeps 3 copies in one datacenter, ZRS spreads 3 across availability zones, GRS adds an async copy in the paired region and GZRS combines both. RA- versions let you read the secondary. A customer-managed failover promotes the secondary when the primary region is down.
- Moving data: AzCopy and object replication. AzCopy moves files in parallel from the command line, signed in with Microsoft Entra ID (and a Storage Blob Data role) or with a SAS. Storage Explorer does the same with a GUI. Object replication keeps copying new block blobs to another account by itself.
- Access tiers and lifecycle management. Blobs sit in Hot, Cool (30-day minimum), Cold (90 days) or Archive (180 days, offline). A lifecycle management rule moves or deletes blobs by age or last access, about once a day. Reading an archived blob means rehydrating it first.
- Undo buttons: soft delete, versioning and snapshots. Blob soft delete and container soft delete keep deleted items for 1 to 365 days. Versioning keeps every previous version of a blob. For Azure Files, share snapshots are read-only point-in-time copies and share soft delete keeps a deleted share.
Contoso HR wants staff to open the HR share with their normal sign-in, no shared keys on sticky notes. Then the team needs last year's documents copied up to Blob Storage. Hit each wall you'll meet in real life and get past it.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Staff mount the HR share with a storage key taped to a monitor.
😊 THE SOLUTION
Let them sign in with their own identity and control access with roles and ACLs.
- One shared key for all✓ Kerberos sign-in
- Everyone sees everything✓ Share-level RBAC roles
- Folder rights matter✓ Windows ACLs
Start with a question
Why should everyone in the office open the HR folder with the same password?
They shouldn’t. On the old file server, Priya opened \\fileserver\hr as Priya, and Windows checked her group membership. Nobody shared a master password.
When the HR folder moves to Azure Files, you want the same thing. Identity-based access lets Priya map the drive with her normal sign-in, and Azure checks who she is before letting her in.
Explain it like I’m 10
The technical explanation
SMB clients authenticate with Kerberos. Azure Files needs to know which directory issues those tickets, and then which permissions to check.
Step 1: choose one identity source
| Identity source | Who signs in | Good for |
|---|---|---|
| On-premises AD DS | Domain users, synced to Microsoft Entra ID with Entra Connect | Domain-joined PCs on the corporate network or VPN |
| Microsoft Entra Domain Services | Users of the managed domain | Apps and VMs joined to an Entra DS domain in Azure |
| Microsoft Entra Kerberos | Hybrid users on Entra-joined or hybrid-joined devices | Remote workers and Azure Virtual Desktop, no domain controller line of sight |
A storage account uses one source at a time. For AD DS you register the account as a computer object in the domain, usually with the AzFilesHybrid PowerShell module (Join-AzStorageAccount). Entra Kerberos and Entra DS are switched on from the portal: File shares > Identity-based access > Set up.
Step 2: share-level permissions (Azure RBAC)
| Role | Allows |
|---|---|
| Storage File Data SMB Share Reader | Read files and directories |
| Storage File Data SMB Share Contributor | Read, write, delete |
| Storage File Data SMB Share Elevated Contributor | Contributor plus changing Windows ACLs |
Assign them on the share (or the account) through Access control (IAM). Identities must exist in Microsoft Entra ID, so AD DS users need to be synced. If you’d rather manage everything with NTFS permissions, set a default share-level permission that applies one of these roles to every authenticated identity.
Owner, Contributor and Storage Account Contributor are management roles. They don’t let anyone open files over SMB.
Step 3: Windows ACLs
Inside the share, normal NTFS permissions apply per folder and file. Admins usually set them once by mounting with the storage account key (a superuser mount) or with a role that allows ACL changes, then using File Explorer or icacls. Share-level permission and ACLs both have to allow the action.
Mount it
# Check the network path first: SMB needs TCP 445 outbound
Test-NetConnection -ComputerName stcontosoprod.file.core.windows.net -Port 445
net use Z: \\stcontosoprod.file.core.windows.net\hr-share
# Turn on Microsoft Entra Kerberos and a default share-level permission
az storage account update -g rg-storage-prod -n stcontosoprod --enable-files-aadkerb true
az storage account update -g rg-storage-prod -n stcontosoprod \
--default-share-permission StorageFileDataSmbShareReader
# Or a share-level role for one group
az role assignment create --role "Storage File Data SMB Share Contributor" \
--assignee hr-staff@contoso.com \
--scope "/subscriptions/<sub>/resourceGroups/rg-storage-prod/providers/Microsoft.Storage/storageAccounts/stcontosoprod/fileServices/default/fileshares/hr-share"
Architect level Cloud-only identities and other details
Microsoft Entra Kerberos was built for hybrid identities, and Microsoft has been extending it to cloud-only users, so check the current docs before you plan around it. For AD DS, the storage account’s computer account password should be rotated like any other. NFS shares don’t use any of this: they rely on network controls (VNet and private endpoints) and Unix permissions instead.
Real-world business scenario
Contoso Health (fictional)
- The problem
- After moving the HR file server to Azure Files, staff mapped the drive with the storage account key, which a dozen people knew.
- What they used
- Microsoft Entra Kerberos for hybrid users on Entra-joined laptops, Storage File Data SMB Share Contributor for the HR-Staff group on the hr-share share, Elevated Contributor for two HR admins, and the original NTFS permissions copied across.
- Why that choice
- Each person signs in as themselves, access follows group membership, and the storage key was rotated and kept only in Key Vault.
- The result
- Remote HR staff map the drive from home without a VPN to a domain controller, and the audit log shows who opened what.
When to use it and when not to
✓ Use it when…
- Users map SMB shares from Windows and you want per-user access.
- You are replacing an on-premises file server and want the same NTFS permissions.
- Azure Virtual Desktop profile shares (FSLogix) need user-level access.
✕ Think twice when…
- Clients use NFS (identity-based SMB access doesn't apply).
- Apps call the REST API (use Microsoft Entra ID with OAuth or a SAS).
- Port 445 is blocked and you can't open it (consider Azure File Sync or a VPN).
↔ Alternatives to consider
- Azure File Sync to cache shares on a Windows Server on-premises.
- Storage account key mounts for admins only, to set ACLs.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner Why not just mount the share with the storage account key?
Model answer
The key is a superuser credential. Everyone using it has full control of every share in the account, you can't tell who did what, and if one person leaves you'd have to rotate the key for everybody. With identity-based access each user signs in as themselves and gets only the access their roles and ACLs allow.
Intermediate What are the two layers of permission in Azure Files?
Model answer
Share-level permissions decide who can reach the share, using Azure RBAC roles like Storage File Data SMB Share Contributor or a default share-level permission. Then directory and file-level permissions are Windows ACLs, the normal NTFS permissions. A user needs both. The more restrictive one wins.
Experienced developer When would you pick Microsoft Entra Kerberos over AD DS?
Model answer
When users sign in to Entra-joined or hybrid-joined devices and I don't want clients to need line of sight to a domain controller, for example remote workers or Azure Virtual Desktop. The identities are hybrid users synced from AD DS with Entra Connect. If everything is already domain-joined on a corporate network, AD DS works fine too.
Scenario Users get "Access is denied" when mapping a drive, even though AD DS authentication is enabled on the account. What do you check?
Model answer
First, share-level permission: does the user or their group have an SMB Share role on the share, or is a default share-level permission set? If the identity is from AD DS, it must be synced to Microsoft Entra ID for RBAC to apply. Then Windows ACLs on the folder. Then network basics: outbound TCP 445 and the storage firewall.
Quick revision
Key points
- One identity source per account - AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
- Share-level roles: SMB Share Reader, Contributor, Elevated Contributor (ACL changes).
- Default share-level permission applies one role to every authenticated identity.
- Windows ACLs apply after share-level permission.
- Hybrid identities must be synced to Microsoft Entra ID for share-level RBAC.
- SMB uses TCP port 445 outbound.
Important terminology
- Identity source
- The directory that issues Kerberos tickets for Azure Files. AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos; one per storage account.
- Microsoft Entra Kerberos
- Microsoft Entra ID issuing Kerberos tickets so users on Entra-joined or hybrid-joined devices can reach Azure Files without line of sight to a domain controller.
- Share-level permission
- Who can reach a share at all, set with Azure RBAC roles or a default share-level permission.
- Default share-level permission
- A share-level role applied to every authenticated identity, useful when you manage access mainly with Windows ACLs.
- Windows ACLs
- NTFS permissions on directories and files inside the share, checked after share-level permission.
- Storage File Data SMB Share Elevated Contributor
- A role that allows read, write, delete and changing Windows ACLs on files and directories over SMB.
Common mistakes
- Enabling an identity source and forgetting share-level permission.
- Assigning Owner or Contributor and expecting users to open files (those are management roles).
- Trying to enable two identity sources on one account.
Exam tips
- "Users must change NTFS permissions" = Storage File Data SMB Share Elevated Contributor.
- "No line of sight to domain controllers, Entra-joined devices" = Microsoft Entra Kerberos.
- "Grant every authenticated user read at share level" = default share-level permission.
Five quick revision questions
-
1.How many identity sources can one storage account use for Azure Files?Show
One.
-
2.Which role lets users read, write and delete files but not change ACLs?Show
Storage File Data SMB Share Contributor.
-
3.What controls access to individual folders and files?Show
Windows ACLs (NTFS permissions).
-
4.Which port must be open outbound for SMB?Show
TCP 445.
-
5.Which CLI flag enables Microsoft Entra Kerberos?Show
az storage account update --enable-files-aadkerb true
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Create and Configure Storage Accounts and Encryption
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.