Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jaryszek
Post Prodigy
Post Prodigy

Steps to add folder access using on-premises gateway

Hi Guys,

my query looks like:

let
    CleanPath = Text.Trim(paramLocalRepositoryPath & "/" & paramRepository),
    Check = try Table.RowCount(Folder.Files(CleanPath)) otherwise 0,
    isValid = if 
        paramEnvironment = "Remote" then true else
        if
            Check > 0 
        then 
            true 
        else 
            error " The folder path is invalid or does not exist: " & CleanPath 
in
    isValid

 

and i am getting error :
You can't schedule refresh for this semantic model because the following data sources currently don't support refresh:

  • Data source for Query1
  • Data source for Query1


So i downloaded on-premises gateway,
create new connection and point to my "cleanPath" parent folder, use Folder as data connection kind and windows auth with username and password. 

1. If this should work also for subfolders if i provided parent folder?
2. Must I create windows password for logged in user? 

Best,
Jacek

1 ACCEPTED SOLUTION
V-yubandi-msft
Community Support
Community Support

Hi @jaryszek ,

Thank you for engaging with the Microsoft Fabric Community.

1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.

2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.

 

reference: Folder.Files - PowerQuery M | Microsoft Learn

 

If my response solved your query, please mark it as the Accepted solution to help others find it easily.

And if my answer was helpful, I'd really appreciate a 'Kudos'.

 

View solution in original post

1 REPLY 1
V-yubandi-msft
Community Support
Community Support

Hi @jaryszek ,

Thank you for engaging with the Microsoft Fabric Community.

1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.

2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.

 

reference: Folder.Files - PowerQuery M | Microsoft Learn

 

If my response solved your query, please mark it as the Accepted solution to help others find it easily.

And if my answer was helpful, I'd really appreciate a 'Kudos'.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.