Azure Files
SMB and NFS · billing models · identity-based access · share-level roles · snapshots · soft delete
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Protocols and billing models
| Model | Account kind and SKU | Media | Notes |
|---|---|---|---|
| Provisioned v2 | FileStorage: PremiumV2_LRS/ZRS, StandardV2_LRS/ZRS/GRS/GZRS | SSD and HDD | Recommended for new deployments. Share size 32 to 262,144 GiB. |
| Provisioned v1 | FileStorage: Premium_LRS/ZRS | SSD only | Share size 100 to 102,400 GiB. |
| Pay-as-you-go | StorageV2: Standard_LRS/ZRS/GRS/GZRS | HDD, SMB only | Access tier: Transaction optimized (default), Hot or Cool. |
- SMB (3.1.1, 3.0, 2.1): SSD and HDD. NFS 4.1: SSD only, LRS or ZRS, Linux, network-based access only. One share can't do both, but one account can hold both.
- HDD shares support LRS, ZRS, GRS and GZRS; SSD shares support LRS and ZRS. Azure Files can't be read from a secondary region, even on RA-GRS accounts.
- You can't move a share between media tiers: create a new share and copy the data.
- Share names: lowercase letters, numbers and single hyphens; start and end with a letter or number.
- Encryption in transit is on by default (SMB 3.x encryption or HTTPS). Turning it off allows SMB 2.1 from the same region only.
- SMB uses outbound TCP 445, which many ISPs block: use VPN or ExpressRoute with a private endpoint from on-premises. NFS uses TCP 2049 and needs a private or service endpoint.
- Mounting with the storage account key is effectively admin access and ignores ACLs.
Identity-based access over SMB
| Identity source | Use when | Key points |
|---|---|---|
| On-premises AD DS | Clients can reach a domain controller; identities synced to Entra ID | Domain-join the storage account with Join-AzStorageAccount (AzFilesHybrid, PowerShell 5.1, domain-joined machine). Only hybrid identities can be authorized. |
| Microsoft Entra Domain Services | You use a managed domain | Entra Domain Services must be enabled and the VMs joined to the managed domain. Enable with --enable-files-aadds. |
| Microsoft Entra Kerberos | Hybrid or cloud-only users on Entra-joined or hybrid-joined Windows clients, no line of sight to a DC | Enable with --enable-files-aadkerb true, grant admin consent to the generated app, exclude it from MFA Conditional Access. |
- Only one identity source per storage account; it applies to all shares in the account. Changing it briefly interrupts access. There is no extra charge.
- Kerberos must be enabled in the account's SMB security settings for all three sources. NFS has no identity-based authentication.
- Entra Kerberos steps: enable on the account; grant admin consent to the app
[Storage Account] <name>.file.core.windows.net; exclude that app from MFA policies (MFA is not supported, error 1327); clients must be Entra joined or hybrid joined, withCloudKerberosTicketRetrievalEnabledset. - Flow: enable an identity source, assign share-level permissions, set directory and file ACLs, set up networking, mount.
Share-level permissions
| Role | Gives |
|---|---|
| Storage File Data SMB Share Reader | Read |
| Storage File Data SMB Share Contributor | Read, write, delete |
| Storage File Data SMB Share Elevated Contributor | Read, write, delete, and modify ACLs |
| Storage File Data Privileged Reader / Contributor | Override ACLs |
- Access needs both a share-level permission (Azure RBAC) and file-level permission (Windows ACLs, set with icacls or File Explorer).
- The default share-level permission applies to all authenticated identities in the account and defaults to None. Set it with
--default-share-permission. Use it when AD DS isn't synced to Entra. If a user has both a role and the default, the higher permission wins. - RBAC changes usually take up to 30 minutes.
- Computer accounts have no Entra identity, so they can only get the default share permission.
Snapshots and soft delete
| Share snapshot | Share soft delete | |
|---|---|---|
| Protects | Files: restore an overwritten or deleted file | A deleted share, including its snapshots |
| Scope | Per share; read-only, point-in-time, incremental | Storage account setting; whole shares, not single files |
| Limits | Up to 200 per share; keep up to 10 years | Retention 1 to 365 days, default 7; on by default for new accounts |
| Doesn't protect | Share or account deletion: deleting a share deletes its snapshots | Individual file deletes |
- Snapshots can be read, copied and deleted, not modified. You can't copy a whole snapshot to another account; use AzCopy file by file. Snapshots don't count toward the share size limit.
- To delete a share that has snapshots, delete the snapshots with it (
--delete-snapshots include). - Restore a file: portal Snapshots, or the Windows Previous Versions tab. Azure Backup manages snapshots for SMB shares only.
- Restore a deleted share: portal Show deleted shares then Undelete, or
az storage share-rm restore. - To permanently delete a soft-deleted share early: undelete it, disable soft delete, delete it again. Soft-deleted provisioned shares still count against quota.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create a provisioned share | az storage share-rm create --resource-group <rg> --storage-account <n> --name <share> --quota 1024 --enabled-protocols SMB | New-AzRmStorageShare ... -QuotaGiB 1024 -EnabledProtocol SMB |
| Create a snapshot | az storage share snapshot --name <share> --account-name <n> | New-AzRmStorageShare ... -Snapshot |
| Delete share and snapshots | az storage share delete --name <share> --account-name <n> --delete-snapshots include | Remove-AzRmStorageShare ... -Include Snapshots |
| Enable soft delete | az storage account file-service-properties update -g <rg> --account-name <n> --enable-delete-retention true --delete-retention-days 7 | Update-AzStorageFileServiceProperty ... -EnableShareDeleteRetentionPolicy $true -ShareRetentionDays 7 |
| Restore a deleted share | az storage share-rm restore --name <share> --deleted-version <v> -g <rg> --storage-account <n> | Restore-AzRmStorageShare ... -DeletedShareVersion <v> |
| Enable Entra Kerberos | az storage account update --name <n> --resource-group <rg> --enable-files-aadkerb true | Set-AzStorageAccount ... -EnableAzureActiveDirectoryKerberosForFile $true |
| Default share permission | az storage account update --name <n> --resource-group <rg> --default-share-permission StorageFileDataSmbShareContributor | Set-AzStorageAccount ... -DefaultSharePermission StorageFileDataSmbShareContributor |
Exam Tips
Tick each tip once you can answer it without looking.
“Linux servers need an NFS file share” → SSD (premium) share in a FileStorage account. Trap: standard HDD shares: NFS is SSD only.
“Convert an HDD share to SSD” → Not possible in place: create a new share and copy the data. Trap: a tier setting on the share.
“On-premises AD users must use domain credentials on a file share” → AD DS authentication, with identities synced to Entra ID. Trap: Entra Domain Services, which needs a managed domain.
“Entra-joined Windows 11 clients, no line of sight to a DC, hybrid identities” → Microsoft Entra Kerberos. Trap: AD DS, which needs DC connectivity.
“Two identity sources on one account (AD DS and Entra Kerberos)” → Not allowed: one identity source per account. Trap: a per-share setting.
“Entra Kerberos mount fails with error 1327” → Exclude the storage account app from MFA Conditional Access. Trap: opening port 445.
“After enabling Entra Kerberos, what must an admin do in Entra?” → Grant admin consent to the [Storage Account] ...file.core.windows.net app. Trap: assigning Global Administrator to users.
“Read, write and delete files but not change ACLs” → Storage File Data SMB Share Contributor. Trap: Elevated Contributor adds the right to modify ACLs.
“Admin must set NTFS ACLs on the share” → Storage File Data SMB Share Elevated Contributor. Trap: Share Contributor.
“AD DS isn't synced to Entra but users still need access” → Default share-level permission for all authenticated identities (default is None). Trap: assigning RBAC roles to AD groups that don't exist in Entra.
“User has Reader on the share; default share permission is Elevated Contributor” → The user gets the higher permission. Trap: the most restrictive one.
“Mounted with the storage account key and ACLs seem ignored” → Key mount is admin-level access. Trap: ACLs always apply.
“Secure NFS access” → Private endpoint or service endpoint. Trap: AD DS authentication: NFS has no identity-based auth.
“File share deleted by mistake” → Soft delete: undelete the share (on by default, 7 days). Trap: restoring from a snapshot: snapshots are deleted with the share.
“User overwrote a file in the share” → Restore from a share snapshot (or Azure Backup). Trap: soft delete, which works at share level only.
“Delete a share that has snapshots” → Delete the snapshots with it (--delete-snapshots include). Trap: deleting the share alone.
“Permanently delete a soft-deleted share before retention ends” → Undelete, disable soft delete, delete again. Trap: waiting or looking for a purge command.
“SMB mount fails from on-premises over the internet” → Port 445 is often blocked: use VPN or ExpressRoute with a private endpoint. Trap: opening port 2049, which is NFS.
Sources
- Plan an Azure Files deployment
- Identity-based authentication overview
- Microsoft Entra Kerberos for Azure Files
- Enable AD DS authentication
- Assign share-level permissions
- Create a classic file share
- Azure Files share snapshots
- Azure file share soft delete
- az storage account (CLI reference)
Checked against Microsoft Learn on November 13, 2026.