Iframe issue

Ralton Stewart
Tera Guru

Hello All I added content block/ Iframe to a dashboard, when I add a sharepoint URL I am getting this error.

it is clearly a url issue as I have tested it with another and it works just not sure how to get it to work.

 

RaltonStewart_0-1700724011729.png

 

1 ACCEPTED SOLUTION

Sateesh Kumar D
ServiceNow Employee
ServiceNow Employee

Hello,

 

You can not add Sharepoint online page in an iframe because of the origin policy that most of the sites on the internet adopted these days. This is mainly for security reasons to avoid web attacks like Clickjacking and XSS.

If you are using SharePoint 2013, try to set HTML Field Security. You can add your servicenow URL there.

Other option is adding AllowFraming option in master page works for SharePoint Online. Turn on the publishing feature and edit the master page to add <WebPartPages:AllowFraming runat="server" />

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Ralton Stewart 

please share what url you are using

are you sure url is correct one?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar I had a sharepoint file shared with me which contains the necessary information if I open the link it works adding it to iframe I am presented with the error.

@Ralton Stewart 

I think it's due to permission. they expect you to login and then see the content. the reason it works when you open the link is since you might be logged into your microsoft account.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sateesh Kumar D
ServiceNow Employee
ServiceNow Employee

Hello,

 

You can not add Sharepoint online page in an iframe because of the origin policy that most of the sites on the internet adopted these days. This is mainly for security reasons to avoid web attacks like Clickjacking and XSS.

If you are using SharePoint 2013, try to set HTML Field Security. You can add your servicenow URL there.

Other option is adding AllowFraming option in master page works for SharePoint Online. Turn on the publishing feature and edit the master page to add <WebPartPages:AllowFraming runat="server" />