Forum Discussion
SitePage support within iframe
We have a site page on SharePoint, is currently encountering connectivity problems and displaying an error message indicating a failure to establish a connection, when this page is rendered in an iFrame.
Error: "<domain_name>.sharepoint.com refused to connect"
Is there any limited with iFrame and Sharepoint Site pages?
Please let me know if anyone has faced this and found a solution.
CC: JinTha
- SvenSieverdingBronze Contributor
Hi Sudha99 ,
Normally you can put pages from the same SharePoint domain into an Iframe and this works. But if that page comes from a different domain then you run into problems
So given the case that your page ishttps://<tenant>.sharepoint.com/sites/<yoursite>/SitePages/MyPage.aspx
Is the page you reference in the Iframe also fromhttps://<tenant>.sharepoint.com
? Or is it from somemthing like this
https://<tenant>-my.sharepoint.com
Also:
Is the page in the Iframe also a site page or is it a system page?
Best Regards,
Sven- Sudha99Copper Contributor
Hello SvenSieverding
thanks for your response 🙂
The page where I am calling the site page is a different domain altogether. www.<domainname>.com
and the site page that I am calling with an iframe of the above domain page is similar to your first url - https://<domain>.sharepoint.com/sites/<sitesection>/SitePages/<pagename>.aspx
Sudha99 You have to add the external website domains in the SharePoint site settings > HTML Field Security settings while using the external website URLs in iframe inside the SharePoint site pages.
Follow steps given here to add external domain to the HTML field security settings: Allow or restrict the ability to embed content on SharePoint pages
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- dipen_anblCopper ContributorI started getting this error after I enabled Microsoft Cloud App SEcurity