0

I have a P2S VPN set up with some Linux and Windows VMs on it. I also have a storage account with an Azure Files file share. I have been following the steps in this guide to try to mount my Azure Files file share on my computer. I can successfully mount the drive using the storage account key, but I cannot mount it using my AD credentials. I have created an Azure AD DS service and linked it to my AD tenant already. Whenever I try to mount the drive using my AD credentials, I just get System error 86 has occurred. The specified network password is not correct. I also already enabled Azure AD DS authentication in the storage account and reset my password so that it would be hashed.

How can I mount the file share from a computer connected to the VPN using the AD credentials?

nullromo
  • 2,165
  • 2
  • 18
  • 39

1 Answers1

0

Getting error 86 when trying to map a drive to storage account file share.

Azure File share with Azure AD authentication: why the current scenario is not supported.

Azure files with Azure AD authentication is supported only when the share is mapped on a VM running on Azure and joined to Azure AD as per below documentation:

https://learn.microsoft.com/en-us/azure/storage/files/storage-files-identity-auth-active-directory-enable

Is there anyway to create some kind of User roles to access the File Share in the way you can map a drive using Azure\StorageAccountName with the password being the Storage Key? So somehow create other Azure\username with a key/password that can also access the Sotrage Account/File Share.

When you go to the file share on portal and click on connect option it will show you a script to map the file share using a default connection credentials for the file share (totally independent of Azure AD credentials), those credentials provide superuser/admin/root access to the file share, so no restrictions at all. That are the default user for the storage account and no other user of this kind can be created.

$connectTestResult = Test-NetConnection -ComputerName snapshotstest.file.core.windows.net -Port 445
if ($connectTestResult.TcpTestSucceeded) {
    # Save the password so the drive will persist on reboot
    cmd.exe /C "cmdkey /add:`"snapshotstest.file.core.windows.net`" /user:`"Azure\snapshotstest`" /pass:`"StorageAcountKey`""
    # Mount the drive
    New-PSDrive -Name Z -PSProvider FileSystem -Root "\\snapshotstest.file.core.windows.net\snapshotstest"-Persist
} else {
    Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
}

Based on the error message you can refer to the suggestion mentioned here Error 86 Specified password is incorrect

  • Unfortunately I cannot verify this answer as I have moved on from Azure Files to a different solution. But thank you for the answer. – nullromo Aug 09 '21 at 22:53