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