Forum Discussion

Aubrey_Quinn's avatar
Aubrey_Quinn
Icon for Microsoft rankMicrosoft
Sep 12, 2022

Is it possible to embed a SharePoint link in an iframe?

I have some files sitting in OneDrive. They are Word documents. I would like to be able to view them inside of a dialog (as read-only). Is it possible to show a document in an iframe?

 

e.g.

(I have removed the real parameters)

    const fileUrl =
        'https://mytenant-my.sharepoint.com/:w:/g/personal/myalias_mytenant_onmicrosoft_com/docid';
                    <iframe 
                        height="900" 
                        width="900" 
                        src={fileUrl} 
                        >
                    </iframe>
 
When I try that I get an error:

ā€ƒ

 

2 Replies

    • Aubrey_Quinn's avatar
      Aubrey_Quinn
      Icon for Microsoft rankMicrosoft

      ganeshsanap Thank you :smile:

       

      I am not trying to embed content into SharePoint but rather the other way around. I want to embed a SharePoint doc in an external 1st party application.

       

      Do you know if it's possible to do that?

Resources