web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to display a Share...
Power Apps
Answered

How to display a SharePoint document inside an iframe component in PowerApps

(1) ShareShare
ReportReport
Posted on by 38
Hi, I created a PCF Iframe component in a PowerApps Canvas app to display a SharePoint document inside it (I’m using the library as the data source). To my surprise, the document only appears in developer mode, but nothing is displayed for end users. According to my research, SharePoint blocks documents from being displayed inside an iframe.

Is there any way to display a SharePoint document inside my Canvas app, knowing that I don’t want to use the PDF Viewer since it’s still experimental?
 
 
 
Categories:
I have the same question (0)
  • MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    You have straightly greyed out the PDF viewer option. PCF is the only option then. 
     
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
     
  • Verified answer
    Haque Profile Picture
    3,653 on at
     
    Security policy like the X-Frame-Options header or Content Security Policy (CSP) blocks SharePoint online to embed its documents inside iframe. Reason becauase PCF iframe component shows the document in developer mode (where some restrictions may be relaxed) but not for end users.
     
     
    One of the three steps may help you to display the document:
     
    1. Use SharePoint File Viewer Control Instead of Iframe 
    2. Use SharePoint Embed Web Part or Embed Link .
    3. Open Document in a New Tab or Dialog
     
     
    Here is a method to view file directly in power aps from sharepoint library.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard