Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 13 of 47
❮Prev Next❯

Identity-Based Access for Azure Files

Module 2: Storage ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Identity-based access and share-level permissions for Azure Files Turn on Microsoft Entra Kerberos and give HR a share-level role.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. Open File shares. Identity-based access says Not configured, so users can only mount with the account key. Select it.
    2. Pick one identity source. Hybrid users signing in to Entra-joined PCs suit Microsoft Entra Kerberos: no domain controller line of sight needed.
    3. Tick Microsoft Entra Kerberos. Domain name and GUID are optional; add them if admins will set Windows ACLs from File Explorer.
    4. Share-level access is Azure RBAC. Open the hr-share share, then Access control (IAM) → + Add → Add role assignment.
    5. HR staff need read and write: Storage File Data SMB Share Contributor. Elevated Contributor also lets people change ACLs.
    6. Assign it to the HR-Staff group. Hybrid identities must exist in Microsoft Entra ID for this to work.
    7. 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.

    😟 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
    🛠️ Solved with: Identity-based access for Azure Files

    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 sourceWho signs inGood for
    On-premises AD DSDomain users, synced to Microsoft Entra ID with Entra ConnectDomain-joined PCs on the corporate network or VPN
    Microsoft Entra Domain ServicesUsers of the managed domainApps and VMs joined to an Entra DS domain in Azure
    Microsoft Entra KerberosHybrid users on Entra-joined or hybrid-joined devicesRemote 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)

    RoleAllows
    Storage File Data SMB Share ReaderRead files and directories
    Storage File Data SMB Share ContributorRead, write, delete
    Storage File Data SMB Share Elevated ContributorContributor 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

    Healthcare

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    Users sign in to Microsoft Entra joined devices with hybrid identities synced from on-premises AD DS. The devices have no network line of sight to domain controllers. Users must mount an Azure file share by using their own credentials. Which identity source should you enable on the storage account?

    Question 2

    Question 2 of 5

    Identity-based access with AD DS is enabled for a storage account. Members of the HR group must be able to read, write and delete files in the share hr-share, but must not change NTFS permissions. Which role should you assign to the group at the share scope?

    Question 3

    Question 3 of 5

    You manage access to an Azure file share mainly with Windows ACLs. Every authenticated user must reach the share, and the ACLs must decide what each user can open. What should you configure at the share level?

    Question 4

    Question 4 of 5

    A storage account uses on-premises AD DS authentication for Azure Files. You attempt to also enable Microsoft Entra Kerberos on the same account. What happens?

    Question 5

    Question 5 of 5

    Users have share-level permission on an Azure file share and the identity source is configured, but they cannot open the folder Payroll. Other folders open successfully. What should you check?

    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. 1.How many identity sources can one storage account use for Azure Files?Show

      One.

    2. 2.Which role lets users read, write and delete files but not change ACLs?Show

      Storage File Data SMB Share Contributor.

    3. 3.What controls access to individual folders and files?Show

      Windows ACLs (NTFS permissions).

    4. 4.Which port must be open outbound for SMB?Show

      TCP 445.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.