Skip to main content
1 of 3
PzYon
  • 421
  • 1
  • 4
  • 11

Display SharePoint Online in an iframe on different domain

We would like to display pages from SharePoint Online in an iframe from a page hosted somewhere else, e.g. in an Azure Web App:

<iframe src="https://site.sharepoint.com/"></iframe>

When we do this (in Chrome for example), we get following error:

Refused to display "https://site.sharepoint.com/_layouts/15/start.aspx#/SitePages/Home.aspx" in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

A page from SharePoint 2013 (on premise) can be displayed in an iframe from a page hosted on another domain, if the following control is added to the head of the master page:

<WebPartPages:AllowFraming runat=”server” />

However if this control is not added to the masterpage, then we also get the above mentioned error.

As far as I know there is no possibility to adjust the master page in a SharePoint Online Team Site. Is that correct? In a Publishing Site you are allowed to adjust the masterpage, or even add a new one. But I didn't find anything similar in Team Sites..

Does anybody know if it is somehow possible to configure domains which do not fall under the "X-FRAME-OPTIONS: SAMEORIGIN"-policy in a SharePoint Online environment? Or if there is another possibility to display SharePoint Online content in an iframe on a different domain. I checked google, checked the "Site settings" and checked the "Office 365 admin center", but didn't find anything..

Thanks in advance!

PzYon
  • 421
  • 1
  • 4
  • 11