Forum Discussion

Divyang Patel's avatar
Divyang Patel
Copper Contributor
Jan 11, 2018

Document Sharing on iframe on different domain

Hi All,

 

I've few documents in Document library on SharePoint Online, for which I've created Guest URLs and adding the URL on iframe/embed url on a site with different domain but either I'm getting an error or frame stays blank.

 

I've tried few features like turning on cross site  connection, publishing feature but still it does not work. 

 

Any help on this would be a great help.

 

Thanks 

6 Replies

  • Paul de Jong's avatar
    Paul de Jong
    Iron Contributor

    I do not expect this to work. See e.g. https://en.wikipedia.org/wiki/Same-origin_policy

     

    Having this functionality poses a major security risk. For example, a malicious site could use an iframe with width 0 and height 0 to access your gmail account and re-use authentication existing cookies.

    This is not a SharePoint problem. 

    I would open the page on the different domain using Chrome and then open the developer console (F12). It should show a security error.


    Paul

     

    • Divyang Patel's avatar
      Divyang Patel
      Copper Contributor

      Hi Paul de Jong

       

      Thanks a lot for the response, However the site where I'm going to use iframe is more of a secure site. We're going to use this on Student Portal, where users have to login in access the data. 

       

      Thanks

Resources