logo
search
Permission & Access Issues

How to Fix Power BI Gateway Access Denied for a PDF File

Elise WilliamsElise Williams Oct 10, 2026 868 views

Question details

The user needs to resolve an access denied error preventing a Power BI dataset from refreshing when connecting to a PDF file stored in a OneDrive folder.

Fix Power BI Gateway Access Denied for a PDF File
Product
Power BI
Device & OS
not provided
Scenario
Refreshing a Power BI dataset via an On-premises data gateway that connects to a local or OneDrive-synced PDF file.
Observed behavior
The gateway reports that access to the PDF file is denied, causing the dataset refresh process to fail.
Before you start

Ensure you have administrator privileges on the machine hosting the Power BI Gateway and that you know which Windows service account the gateway uses to run.

Solution 1Recommended

Grant Folder and File Permissions to the Gateway Service Account

Assign the correct read permissions to the Power BI Gateway account so it can access the OneDrive directory where the PDF is stored.

The most common reason for this error is that the Windows service account running the On-premises data gateway lacks NTFS read permissions for the specific OneDrive folder or the PDF file itself.

1
Identify the Service Account

Open the Windows Services app (services.msc) on your gateway machine. Locate 'On-premises data gateway service' and check the 'Log On As' column to find the exact account name.

2
Access Folder Properties

Navigate to the OneDrive folder containing your target PDF file, right-click the folder, and select 'Properties'.

3
Edit Security Permissions

Switch to the 'Security' tab and click 'Edit' to change permissions. Click 'Add' to enter the gateway service account name you found earlier.

4
Grant Read Access

Select the newly added account, check the boxes for 'Read' and 'List folder contents' under the Allow column, and click 'Apply' then 'OK' to save.

Grant Folder and File Permissions to the Gateway Service Account
Permissions Applied: Once permissions propagate, you can trigger a manual refresh in Power BI Service to verify the gateway connection.
Free Microsoft Office alternative

Manage and Edit PDF Files Seamlessly with WPS Office

While resolving backend data gateway issues, you can simplify your daily document management with WPS Office. It is a lightweight, all-in-one suite that perfectly handles PDFs, Word documents, Excel spreadsheets, and PowerPoint presentations without locking up your sync folders.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install and Launch: Run the setup file and follow the on-screen instructions to install the application in minutes.
  3. 3. Open Your Files: Double-click any PDF or Office document to open, view, and edit it instantly with a highly familiar user interface.
View, edit, merge, and convert PDF files with professional-grade tools.Highly compatible with Microsoft Office formats (DOCX, XLSX, PPTX).Lightweight design ensures fast performance without interfering with background sync services like OneDrive.Free to download and fully functional across Windows, Mac, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power BI Gateway say access denied for a local PDF file?

This error occurs because the specific Windows service account used by the On-premises data gateway does not have NTFS read permissions for the file path, or the file is locked by another program.

Can I use OneDrive files with the On-premises data gateway?

Yes, but the files must be physically synced to the local drive of the gateway machine. Using the 'Always keep on this device' option in OneDrive ensures the file is accessible.

How do I find out which account is running the Power BI Gateway?

Open the Windows Services application (services.msc), locate the 'On-premises data gateway service', and check the 'Log On As' column. By default, it might be 'NT SERVICE\PBIEgwService'.

Does having a PDF file open prevent Power BI from refreshing?

Yes. If a PDF file is actively open in a viewer that places an exclusive lock on the file, the gateway cannot read it, which will result in an access denied or locked file error during refresh.