Fix SharePoint PDF Loading Errors in Power Apps PDF Viewer
Question details
The user is unable to open a PDF stored in SharePoint using the Power Apps PDF Viewer via a direct link.

- Product
- Microsoft Power Apps
- Device & OS
- not provided
- Scenario
- Attempting to display a PDF document hosted on a SharePoint site directly within a Power Apps application using the URL.
- Observed behavior
- The Power Apps PDF Viewer fails to load the file and displays the error message: 'Couldn’t open PDF. Open in my browser instead.'
Ensure you have active permissions to manage Power Automate flows within your Power Apps environment and have read access to the source SharePoint document library.
Retrieve PDF Content Using a Power Automate Flow
Bypass the direct URL authentication limitation by using a Power Automate flow to fetch the actual file content from SharePoint and pass it to Power Apps.
The Power Apps PDF Viewer control often struggles with securely authenticating direct SharePoint links, which triggers the 'Open in my browser' error. Fetching the file content directly as data resolves this restriction.
Navigate to the Power Automate interface and create a new flow with a 'PowerApps' trigger so it can be called directly from your application.
Insert a new step and search for the SharePoint 'Get file content' action. Select your SharePoint Site Address and specify the File Identifier for your PDF.
Add a 'Respond to a PowerApp or flow' action. Create a text output variable and assign the SharePoint file content to it so the data is sent back to your app.
In your Power Apps studio, set the 'Document' property of your PDF Viewer control to the variable that calls and stores the result of your newly created Power Automate flow.

Manage and View PDFs Seamlessly with WPS Office
If you are looking for an easier way to read, edit, and manage PDF documents without building complex application flows, WPS Office offers a comprehensive, lightweight solution. It seamlessly handles PDFs alongside your standard document formats.
- 1. Download and Install: Get the free WPS Office suite from the official website and run the quick installer.
- 2. Open Your PDF: Launch WPS Office and drag your PDF document directly into the workspace to view it instantly without loading errors.
- 3. Edit and Save: Use the dedicated PDF tools to highlight text, add annotations, or modify pages before saving or sharing.

Frequently Asked Questions
Why does the Power Apps PDF viewer show 'Open in my browser instead' for SharePoint links?
This error occurs because the PDF Viewer control in Power Apps cannot seamlessly pass authentication tokens to secure SharePoint URLs. It prompts you to use a browser where you already have an active, authenticated session.
How can I improve the PDF loading time in Power Apps?
If your PDF takes 20 seconds or more to load using a Power Automate flow, the file size might be too large. Try compressing the PDF before uploading it to SharePoint. For highly specialized performance troubleshooting, it is recommended to post your issue on the official Power Apps community forums.
Does the Power Apps PDF Viewer support public URLs?
Yes, the Power Apps PDF Viewer can easily load PDFs hosted on public URLs that do not require any login or authentication. The issues primarily arise with secure enterprise links like SharePoint.




