SharePoint iframe doesn't allow another site collection links

Cherry P 21 Reputation points


We are using SharePoint server 2019. I am trying to display an another site collection page in the iframe code in a different site collection within the same SharePoint farm. I get "site refused to connect error". I checked in the Edge developer tools and found the error below.

Eg: In the ABC site collection (, I am trying to display XYZ site collection's page ( in the Embed web part using an iframe.

Error message:

“Refused to display '' in a frame because it set 'X-Frame-Options' to 'sameorigin' "

Both site collections are in the same SharePoint farm. In both site collections, we set HTML Field Security option to allow any external domain in the iframe.


DENY - The page cannot be displayed in a frame, regardless of the site attempting to do so.

SAMEORIGIN - The page can only be displayed if all ancestor frames are same origin to the page itself.

I am wondering is this by design? Microsoft doesn’t allow to iframe other SharePoint site collection pages in a different site collection with in the same farm? Or is this some other security related outside of SharePoint in our organization?

I have the same issue using page viewer web part in the classic SharePoint pages.

Any insight/suggestions are greatly appreciated.


SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
1,965 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,490 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,625 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChengFeng - MSFT 3,535 Reputation points Microsoft Vendor

    HI @Cherry P

    Thanks for letting us know your user experience. According to your case description, I do understand how frustrated you are now.


    When I received the case, I searched a lot of documents did a lot of researches. And I feel regretful to inform you that it turns out to be a by-design one.


    Here is a link for your reference:

    And I noticed that some end users have also proposed the same request, it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.



    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng