Aug 14 2023 11:04 PM - edited Aug 14 2023 11:05 PM
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
Aug 15 2023 05:21 AM
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 is
https://<tenant>.sharepoint.com/sites/<yoursite>/SitePages/MyPage.aspx
Is the page you reference in the Iframe also from
https://<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
Aug 20 2023 11:45 PM
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
Aug 22 2023 04:52 AM
@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.
Dec 20 2023 09:32 AM