Mapping a Network Drive to an Azure File Share Using Domain Credentials

Published 03-23-2021 07:50 AM 3,136 Views
Microsoft

Purpose:

The purpose of this post is to walk through the experience of configuring a Windows client to map a drive to an Azure File Share, with the User Experience that they are used to.  The process is documented in a multi-part article on Microsoft Docs. This post is meant to summarize the experience of going through this process and offer some guidance on areas that may be confusing.  The steps to complete this task along with notes on the experience will be listed below.

 

Assumptions:

Knowledge of creating Azure Storage Accounts, Azure File Shares, and Synchronizing on-premise Active Directory user accounts to Azure AD with Azure AD Connect is assumed.  It is also assumed that you have inserted data into the Azure File Share with a supported tool, like Azure File Sync, AzCopy, Windows Explorer, etc.  Depending on the security posture needed for a production environment, this configuration would likely have tighter access controls.  For our demonstration purposes, this configuration is being used for functionality and convenience.

 

Steps:

 

  1. Join the Azure Storage Account containing the file share to AD (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-enable

Run "Join-AzStorageAccountForAuth" cmdlet to join Storage account to Azure AD as shown here:

 

$ResourceGroupName = "My-Resource-Group-Name"
$StorageAccountName = "My-Sub-Name"
$Domain = "My-FQDN"
Import-Module -Name AzFilesHybrid
Join-AzStorageAccountForAuth `
        -ResourceGroupName $ResourceGroupName `
        -StorageAccountName $StorageAccountName `
        -DomainAccountType "ComputerAccount" # Default is set as ComputerAccount `
        -Domain $Domain

 

  1. Sync AD Users that need to map the drives to Azure AD using Azure AD Connect. 

Note:  These accounts cannot be privileged accounts in Active Directory because Azure AD Connect will not sync those accounts to Azure AD.

 

  1. Synchronize/Rotate Azure Storage Account AD Computer Object Password to your Azure Storage Account (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-update-password).  

Note:  If you omit this process, your AD users will NOT be able to access the Azure File Share as intended

 

Connect-AzAccount -Environment "AzureCloud" #Adjust as-necessary
$ResourceGroupName = "My-Resource-Group-Name"
$StorageAccountName = "My-Sub-Name"
Ipmo AzFilesBybrid
Update-AzStorageAccountADObjectPassword `
        -RotateToKerbKey kerb2 `
        -ResourceGroupName $ResourceGroupName `
        -StorageAccountName $StorageAccountName

 

  1. Assign share permissions:  Assign Azure Storage Share Level Access roles ("SMB Roles") to sync'd AD Users (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-assign-permissions)

Note:  There are three built-in Azure SMB Roles that can be used to control access at the Azure File Share Level.  These are share-level permissions; NTFS permissions do NOT control access at the Azure File Share level.

 

  1. Administratively Modify/Assign NTFS permissions (Only If Needed):  The following scenarios will determine your path to assigning NTFS permissions: 
    1. Your permissions are fine and do not need modified:  Skip to Step 8
    2. Your permissions need to be changed and you have an AD Sync'd user that has the permissions to make the needed changes via mapped drive:  Skip to Step 8
    3. Your permissions need to be changed and you do NOT have a Sync'd user that has NTFS permissions to do it, follow the code block below:  Keep in mind that this method of mapping is using the storage account key and not a user account so proceed with caution. 

 

$StorageAccountName = "My-Sub-Name"
$AzureFileShare = "My-Share-Name"
$connectTestResult = Test-NetConnection -ComputerName "$StorageAccountName.file.core.windows.net" -Port 445
if ($connectTestResult.TcpTestSucceeded)
{
  net use X: "\\$StorageAccountName.file.core.windows.net\$AzureFileShare" /user:Azure\<StorageAcctName> '<StorageAccessKey>'
}
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."
}

 

  1. If you used Step 5:  Set ACL's on File system in Azure Share (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-configure-permissi...)

 

  1. If you used Step 5:  Remove Drive Mapping Using Storage account key.  If you used the script from above, you can use the following script to remove the drive mapping as the storage account key.  This step is necessary so that you are able to successfully map the drive with your user account, as described in step 8. 

Note:  It is not recommended to keep the drive mapped with the Storage Account Key.

 

net use X: /DELETE

 

  1. Map a drive to your Azure File Share using your AD user account (Windows Explorer, Command-Line, PowerShell, etc.)
    1. Once the drive is mapped, make any necessary NTFS ACL Changes as-needed. 
    2.  
  2. Troubleshooting:  If you encounter issues with this process, try the following tools for troubleshooting/debug information:
    1. https://docs.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-windows-file-connection-pr...
    2. Specifically, the following PowerShell command can expose many things that could be causing problems:

 

Connect-AzAccount -Environment "AzureCloud" #Adjust as-necessary
$ResourceGroupName = "My-Resource-Group-Name"
$StorageAccountName = "My-Sub-Name"
Ipmo AzFilesBybrid
Debug-AzStorageAccountAuth -StorageAccountName $StorageAccountName -ResourceGroupName $ResourceGroupName -Verbose

 

 

References:

Overview - On-premises AD DS authentication to Azure file shares | Microsoft Docs

Enable AD DS authentication to Azure file shares | Microsoft Docs

Control access to Azure file shares - on-premises AD DS authentication | Microsoft Docs

Control what a user can do at the file level - Azure file shares | Microsoft Docs

Mount Azure file share to an AD DS-joined VM | Microsoft Docs

Update AD DS storage account password | Microsoft Docs

%3CLINGO-SUB%20id%3D%22lingo-sub-2220773%22%20slang%3D%22en-US%22%3EMapping%20a%20Network%20Drive%20to%20an%20Azure%20File%20Share%20Using%20Domain%20Credentials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2220773%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CI%3EPurpose%3A%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20purpose%20of%20this%20post%20is%20to%20walk%20through%20the%20experience%20of%20configuring%20a%20Windows%20client%20to%20map%20a%20drive%20to%20an%20Azure%20File%20Share%2C%20with%20the%20User%20Experience%20that%20they%20are%20used%20to.%26nbsp%3B%20The%20process%20is%20documented%20in%20a%20multi-part%20article%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-auth-active-directory-enable%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20Docs%3C%2FA%3E.%20This%20post%20is%20meant%20to%20summarize%20the%20experience%20of%20going%20through%20this%20process%20and%20offer%20some%20guidance%20on%20areas%20that%20may%20be%20confusing.%26nbsp%3B%20The%20steps%20to%20complete%20this%20task%20along%20with%20%3CFONT%20color%3D%22%23FF0000%22%3Enotes%3C%2FFONT%3E%20on%20the%20experience%20will%20be%20listed%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3EAssumptions%3A%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CI%3EKnowledge%20of%20creating%20Azure%20Storage%20Accounts%2C%20Azure%20File%20Shares%2C%20and%20Synchronizing%20on-premise%20Active%20Directory%20user%20accounts%20to%20Azure%20AD%20with%20Azure%20AD%20Connect%20is%20assumed.%26nbsp%3B%20It%20is%20also%20assumed%20that%20you%20have%20inserted%20data%20into%20the%20Azure%20File%20Share%20with%20a%20supported%20tool%2C%20like%20Azure%20File%20Sync%2C%20AzCopy%2C%20Windows%20Explorer%2C%20etc.%26nbsp%3B%20Depending%20on%20the%20security%20posture%20needed%20for%20a%20production%20environment%2C%20this%20configuration%20would%20likely%20have%20tighter%20access%20controls.%26nbsp%3B%20For%20our%20demonstration%20purposes%2C%20this%20configuration%20is%20being%20used%20for%20functionality%20and%20convenience.%3C%2FI%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3ESteps%3A%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%221%22%3E%0A%3CLI%3EJoin%20the%20Azure%20Storage%20Account%20containing%20the%20file%20share%20to%20AD%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-enable%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-enable%3C%2FA%3E)%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3ERun%20%22Join-AzStorageAccountForAuth%22%20cmdlet%20to%20join%20Storage%20account%20to%20Azure%20AD%20as%20shown%20here%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%24ResourceGroupName%20%3D%20%22My-Resource-Group-Name%22%0A%24StorageAccountName%20%3D%20%22My-Sub-Name%22%0A%24Domain%20%3D%20%22My-FQDN%22%0AImport-Module%20-Name%20AzFilesHybrid%0AJoin-AzStorageAccountForAuth%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-ResourceGroupName%20%24ResourceGroupName%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-StorageAccountName%20%24StorageAccountName%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-DomainAccountType%20%22ComputerAccount%22%20%23%20Default%20is%20set%20as%20ComputerAccount%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-Domain%20%24Domain%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3ESync%20AD%20Users%20that%20need%20to%20map%20the%20drives%20to%20Azure%20AD%20using%20Azure%20AD%20Connect.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3ENote%3A%26nbsp%3B%3C%2FFONT%3E%20These%20accounts%20cannot%20be%20privileged%20accounts%20in%20Active%20Directory%20because%20Azure%20AD%20Connect%20will%20not%20sync%20those%20accounts%20to%20Azure%20AD.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3ESynchronize%2FRotate%20Azure%20Storage%20Account%20AD%20Computer%20Object%20Password%20to%20your%20Azure%20Storage%20Account%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-update-password%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-update-password%3C%2FA%3E).%26nbsp%3B%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CFONT%20color%3D%22%23FF0000%22%3ENote%3A%26nbsp%3B%3C%2FFONT%3E%20If%20you%20omit%20this%20process%2C%20your%20AD%20users%20will%20NOT%20be%20able%20to%20access%20the%20Azure%20File%20Share%20as%20intended%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EConnect-AzAccount%20-Environment%20%22AzureCloud%22%20%23Adjust%20as-necessary%0A%24ResourceGroupName%20%3D%20%22My-Resource-Group-Name%22%0A%24StorageAccountName%20%3D%20%22My-Sub-Name%22%0AIpmo%20AzFilesBybrid%0AUpdate-AzStorageAccountADObjectPassword%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-RotateToKerbKey%20kerb2%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-ResourceGroupName%20%24ResourceGroupName%20%60%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-StorageAccountName%20%24StorageAccountName%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3EAssign%26nbsp%3B%3CU%3E%3CEM%3Eshare%3C%2FEM%3E%3C%2FU%3E%20permissions%3A%26nbsp%3B%20Assign%20Azure%20Storage%20Share%20Level%20Access%20roles%20(%22SMB%20Roles%22)%20to%20sync'd%20AD%20Users%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-assign-permissions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-assign-permissions%3C%2FA%3E)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3ENote%3A%26nbsp%3B%3C%2FFONT%3E%20There%20are%20three%20built-in%20Azure%20SMB%20Roles%20that%20can%20be%20used%20to%20control%20access%20at%20the%20Azure%20File%20Share%20Level.%26nbsp%3B%20These%20are%20share-level%20permissions%3B%20NTFS%20permissions%20do%20NOT%20control%20access%20at%20the%20Azure%20File%20Share%20level.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CLI-WRAPPER%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3COL%20start%3D%225%22%3E%0A%3CLI%3EAdministratively%20Modify%2FAssign%26nbsp%3B%3CU%3E%3CEM%3ENTFS%3C%2FEM%3E%3C%2FU%3E%20permissions%20%3CSTRONG%3E(Only%20If%20Needed)%3C%2FSTRONG%3E%3A%26nbsp%3B%20The%20following%20scenarios%20will%20determine%20your%20path%20to%20assigning%20NTFS%20permissions%3A%26nbsp%3B%3COL%20type%3D%22a%22%3E%0A%3CLI%3EYour%20permissions%20are%20fine%20and%20do%20not%20need%20modified%3A%26nbsp%3B%20%3CSTRONG%3ESkip%20to%20Step%208%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EYour%20permissions%20need%20to%20be%20changed%20and%20you%20have%20an%20AD%20Sync'd%20user%20that%20has%20the%20permissions%20to%20make%20the%20needed%20changes%20via%20mapped%20drive%3A%26nbsp%3B%20%3CSTRONG%3ESkip%20to%20Step%208%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EYour%20permissions%20need%20to%20be%20changed%20and%20you%20do%20NOT%20have%20a%20Sync'd%20user%20that%20has%20NTFS%20permissions%20to%20do%20it%2C%20follow%20the%20code%20block%20below%3A%26nbsp%3B%20%3CSTRONG%3EKeep%20in%20mind%20that%20this%20method%20of%20mapping%20is%20using%20the%20storage%20account%20key%20and%20not%20a%20user%20account%20so%20proceed%20with%20caution.%3C%2FSTRONG%3E%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%24StorageAccountName%20%3D%20%22My-Sub-Name%22%0A%24AzureFileShare%20%3D%20%22My-Share-Name%22%0A%24connectTestResult%20%3D%20Test-NetConnection%20-ComputerName%20%22%24StorageAccountName.file.core.windows.net%22%20-Port%20445%0Aif%20(%24connectTestResult.TcpTestSucceeded)%0A%7B%0A%26nbsp%3B%20net%20use%20X%3A%20%22%5C%5C%24StorageAccountName.file.core.windows.net%5C%24AzureFileShare%22%20%2Fuser%3AAzure%5C%3CSTORAGEACCTNAME%3E%20'%3CSTORAGEACCESSKEY%3E'%0A%7D%0Aelse%0A%7B%0A%26nbsp%3B%20Write-Error%20-Message%20%22Unable%20to%20reach%20the%20Azure%20storage%20account%20via%20port%20445.%20Check%20to%20make%20sure%20your%20organization%20or%20ISP%20is%20not%20blocking%20port%20445%2C%20or%20use%20Azure%20P2S%20VPN%2C%26nbsp%3B%26nbsp%3B%20Azure%20S2S%20VPN%2C%20or%20Express%20Route%20to%20tunnel%20SMB%20traffic%20over%20a%20different%20port.%22%0A%7D%3C%2FSTORAGEACCESSKEY%3E%3C%2FSTORAGEACCTNAME%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%226%22%3E%0A%3CLI%3E%3CSTRONG%3EIf%20you%20used%20Step%205%3A%3C%2FSTRONG%3E%26nbsp%3B%20Set%20ACL's%20on%20File%20system%20in%20Azure%20Share%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-configure-permissions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-configure-permissions%3C%2FA%3E)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%227%22%3E%0A%3CLI%3E%3CSTRONG%3EIf%20you%20used%20Step%205%3A%26nbsp%3B%20%3C%2FSTRONG%3ERemove%20Drive%20Mapping%20Using%20Storage%20account%20key.%26nbsp%3B%20If%20you%20used%20the%20script%20from%20above%2C%20you%20can%20use%20the%20following%20script%20to%20remove%20the%20drive%20mapping%20as%20the%20storage%20account%20key.%26nbsp%3B%20This%20step%20is%20necessary%20so%20that%20you%20are%20able%20to%20successfully%20map%20the%20drive%20with%20your%20user%20account%2C%20as%20described%20in%20step%208.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3ENote%3A%3C%2FFONT%3E%26nbsp%3B%20It%20is%20not%20recommended%20to%20keep%20the%20drive%20mapped%20with%20the%20Storage%20Account%20Key.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Enet%20use%20X%3A%20%2FDELETE%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%228%22%3E%0A%3CLI%3EMap%20a%20drive%20to%20your%20Azure%20File%20Share%20using%20your%20AD%20user%20account%20(Windows%20Explorer%2C%20Command-Line%2C%20PowerShell%2C%20etc.)%3COL%20type%3D%22a%22%3E%0A%3CLI%3EOnce%20the%20drive%20is%20mapped%2C%20make%20any%20necessary%20NTFS%20ACL%20Changes%20as-needed.%26nbsp%3B%3C%2FLI%3E%0A%26nbsp%3B%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3ETroubleshooting%3A%26nbsp%3B%20If%20you%20encounter%20issues%20with%20this%20process%2C%20try%20the%20following%20tools%20for%20troubleshooting%2Fdebug%20information%3A%3COL%20type%3D%22a%22%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-troubleshoot-windows-file-connection-problems%23unable-to-mount-azure-files-with-ad-credentials%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-troubleshoot-windows-file-connection-problems%23unable-to-mount-azure-files-with-ad-credentials%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3ESpecifically%2C%20the%20following%20PowerShell%20command%20can%20expose%20many%20things%20that%20could%20be%20causing%20problems%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EConnect-AzAccount%20-Environment%20%22AzureCloud%22%20%23Adjust%20as-necessary%0A%24ResourceGroupName%20%3D%20%22My-Resource-Group-Name%22%0A%24StorageAccountName%20%3D%20%22My-Sub-Name%22%0AIpmo%20AzFilesBybrid%0ADebug-AzStorageAccountAuth%20-StorageAccountName%20%24StorageAccountName%20-ResourceGroupName%20%24ResourceGroupName%20-Verbose%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3EReferences%3A%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-auth-active-directory-enable%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EOverview%20-%20On-premises%20AD%20DS%20authentication%20to%20Azure%20file%20shares%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-enable%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EEnable%20AD%20DS%20authentication%20to%20Azure%20file%20shares%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-assign-permissions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EControl%20access%20to%20Azure%20file%20shares%20-%20on-premises%20AD%20DS%20authentication%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-configure-permissions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EControl%20what%20a%20user%20can%20do%20at%20the%20file%20level%20-%20Azure%20file%20shares%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-mount-file-share%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMount%20Azure%20file%20share%20to%20an%20AD%20DS-joined%20VM%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Ffiles%2Fstorage-files-identity-ad-ds-update-password%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EUpdate%20AD%20DS%20storage%20account%20password%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FI%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2220773%22%20slang%3D%22en-US%22%3E%3CP%3EMapping%20a%20Network%20Drive%20to%20an%20Azure%20File%20Share%20Using%20Domain%20Credentials%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2220773%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EInfra%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Mar 23 2021 07:50 AM
Updated by: