I have an O365 tenant and I'm a global admin. I'm trying to embed a video in one of my SharePoint sites but SharePoint displays the following message when I try to insert the html code:

Embedding content from this website isn’t allowed, but your admin can change this setting. They will need to add ‘www.myvideodomain.net’ to the list of sites that are allowed.

By doing some research I encountered that I can enable the HTML field security link option to whitelist the site address from where the video will be embedded. To do so I just need to execute the following PowerShell command:

Connect-SPOService -URL https://[O365domain]-admin.sharepoint.com
Set-SPOSite https://[O365domain].sharepoint.com/sites/[site]-DenyAddAndCustomizePages $false

The code executes properly but I can't see the HTML field link under my site collections settings yet.

Any suggestions on how to enable it?

1 Answer 1


You can add a site to trusted sites list to embed the iframe from the site collection setting.

Go to Site Collection > Site Settings > Site Collection Administration > HTML Field Security.

Add your site to permit the iframe.

enter image description here

Allow or restrict the ability to embed the content on SharePoint pages

  • Yes, I know that, the thing is HTML Field Security doesn't show up as an option. Any ideas? Jun 23, 2017 at 12:56
  • Did you enable the Script at a tenant level? Jun 23, 2017 at 12:58
  • I don't think so, I enabled the script via PowerShell by using Set-SPOsite mytenantdomain.sharepoint.com/sites/mysite -DenyAddAndCustomizePages 0 Jun 23, 2017 at 14:09
  • You see the "HTML Field Security" option now? Jun 23, 2017 at 14:12
  • I don't see it. Command got executed without a problem but I don't see the option yet. Do I need to wait like 24hrs or something like that? That's a little bit weird.. Jun 23, 2017 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.