Embed Web Part and "refused to connect"

Anonymous
2020-06-16T16:23:04+00:00

I work for a school and have been given rest API code by a recruitment agency so my learners can search for jobs directly from our Sharepoint site. Aware that modern Sharepoint pages do not support scripts, I created a basic HTML file stored it on a server and tried to use the embed web part. I created iframe code on Sharepoint, and verified I have permission to embed the external sites. All I get is that the connection was refused however. 

Can anyone offer any help and advise? IS it because the external page I am embedding has a <script> within it? If so, any ideas on how I can achieve my goal without resorting to a simple web link to external page and loosing all the formatting etc from the SOL site?

Kind regards,

Trevor

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2020-06-16T22:04:23+00:00

Hi Trevor,

As per your description, make sure you allow the ability to Embed content on SharePoint Pages, below article for allowing

Allow or restrict the ability to embed content on SharePoint pages

How to embed content from other websites in SharePoint Online

Try to go to site settings-> HTML Field Security, check the option "Allow contributors to insert iframes from any domain"

For your reference: Add content to your page using the Embed web part

I appreciate your time and understanding.

Best Regards

Waqas Muhammad

Was this answer helpful?

7 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-08-12T22:08:46+00:00

    Some sites block being iframed - which I guess is the problem with the recruitment agency in the question. You can check that by trying to iframe a page from their site in an embed web part. If that succeeds then there's probably either something wrong with the rest api url or something else SP doesn't like. One other possibility is that SP won't open .html files in the browser for some unknown reason. This is a daft restriction because if you change the file extension to .aspx, the same file will open.

    And by the way, the reply marked as the answer by a fellow support person, isn't overly helpful and doesn't resolve the issue..

    6/27/2020 7:19:37 PM Marked as answer Arck Tang MSFT

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-08-12T11:23:04+00:00

    Hi, I have the same problem.

    Even if I set HTML Field Security to allow all external sites, when I add the iframe in sharepoint online I get asked to add the site to the list of exempions.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2020-06-18T21:55:11+00:00

    Hi Trevor,

    Feel free to post back if you need further assistance.

    Best Regards,

    Waqas Muhammad

    Was this answer helpful?

    0 comments No comments