Unable to mount Azure File Share: System error 1396 has occurred. The target account name is incorrect.

Ryan P 6 Reputation points
2024-01-01T23:05:01.3233333+00:00

I have created an Azure Storage account and file shares for use with hybrid identities:

Identity-based access: Configured (MS Entra Kerberos)

Default share-level permissions: Enabled

I am mapping the drives via net use but have also tried with the powershell script that is output when you click 'connect' on the share.

After creating it, everything seemed to work well. I could map drives in my hybrid joined Azure AVD VMs (multisession Win11 enterprise 22H2) and and on local hybrid joined Windows clients (various win10 and 11).

However, after a reboot, my AVD clients stopped being able to map the drives, showing the error:

System error 1396 has occurred.

The target account name is incorrect.

The shares continue to map correctly after reboots on my physical clients and non-Azure VMS. Ive used several different accounts, created more shares, tried allowing access from all networks.

Update: I ran AzFileDiagnostics.ps1 on an affected avd and everything returned ok. The drive mapped. As part of that process, it asked me for an access key. I entered it. I guess thats why it worked this time. But Im at a loss about why thats necessary? I didnt need that access key the first time I mapped these and still dont need it on other clients mapping the exact same share with same user account.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,203 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,840 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anand Prakash Yadav 7,465 Reputation points Microsoft Vendor
    2024-01-08T13:05:03.62+00:00

    Ryan P, I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.
    User's image

    Issue: Customer configured an Azure Storage account with file shares for use with hybrid identities, utilizing identity-based access with Microsoft Entra Kerberos. Default share-level permissions are enabled.

    Mapping drives works initially on both Azure AVD VMs (multi-session Windows 11 Enterprise 22H2) and local hybrid-joined Windows clients (various Windows 10 and 11).

    After a reboot, AVD clients encounter the "System error 1396" with the message "The target account name is incorrect." Physical clients and non-Azure VMs do not exhibit the same issue.

    Error Message:
    System error 1396 has occurred.
    The target account name is incorrect.

    Solution: Customer changed from using MS Entra Kerberos based access to AD DS based identity. Now everything works. Customer to setup Entra Domain Services and start moving devices/users, etc to the Entra cloud completely.