How to use Power BI connect with Azure File Share?

YQ 45 Reputation points
2023-09-13T05:05:37.07+00:00

Hi, I would like to ask is Power BI can connect to Azure File Share and how Power BI connect to Azure File Share? I found one post from Microsoft Power BI Community site and inside giving one solution with hyperlink of "Mount SMB Azure file share on Windows".

From this document link above, under "Mount the Azure file share" section, I got issue at Step 8 and cannot proceed to next. I'm not sure where should put the script to run. I tried to paste in PowerShell command screen, I got error message something related to system error 67.

Moreover, I also tried to run test connection command. First test connection command is with port 445, I failed and got status DestinationHostUnreachable. While, second test connection command is with port 443, I managed to get successfully to ping. Then, I just try to continue with the documentation, under "Mount the Azure file share with File Explorer" section, I unable to can see the mounted file after insert my credentials info and UNC path.

If there is other methods for me to try out this, kindly share here. PS: I'm new beginner of this Power BI and Azure services. 

Thank you.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,152 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dillon Silzer 54,281 Reputation points
    2023-09-13T05:16:05.8933333+00:00

    Hi YQ,

    The error 67 has to do with Port 445 being blocked:

    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/files-troubleshoot-smb-connectivity?toc=%2Fazure%2Fstorage%2Ffiles%2Ftoc.json&tabs=windows#cause-1-port-445-is-blocked

    Cause 1: Port 445 is blocked

    System error 53 or System error 67 can occur if port 445 outbound communication to an Azure Files datacenter is blocked. To see the summary of ISPs that allow or disallow access from port 445, go to TechNet.

    To check if your firewall or ISP is blocking port 445, use the AzFileDiagnostics tool or the Test-NetConnection cmdlet.

    To use the Test-NetConnection cmdlet, the Azure PowerShell module must be installed. See Install Azure PowerShell module for more information. Remember to replace <your-storage-account-name> and <your-resource-group-name> with the relevant names for your storage account.

    $resourceGroupName = "<your-resource-group-name>"
    $storageAccountName = "<your-storage-account-name>"
    
    # This command requires you to be logged into your Azure account and set the subscription your storage account is under, run:
    # Connect-AzAccount -SubscriptionId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
    # if you haven't already logged in.
    $storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName
    
    # The ComputerName, or host, is <storage-account>.file.core.windows.net for Azure Public Regions.
    # $storageAccount.Context.FileEndpoint is used because non-Public Azure regions, such as sovereign clouds
    # or Azure Stack deployments, will have different hosts for Azure file shares (and other storage resources).
    Test-NetConnection -ComputerName ([System.Uri]::new($storageAccount.Context.FileEndPoint).Host) -Port 445
    

    If the connection was successful, you should see the following output:

    OutputCopy

    ComputerName     : <your-storage-account-name>
    RemoteAddress    : <storage-account-ip-address>
    RemotePort       : 445
    InterfaceAlias   : <your-network-interface>
    SourceAddress    : <your-ip-address>
    TcpTestSucceeded : True
    

    You must make sure that port 445 is not being blocked on your router/firewall or else you will continue to see this error.


    If this is helpful please accept answer.