- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 11:21 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 02:29 AM - edited 11-23-2023 02:30 AM
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" />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 11:35 PM
please share what url you are using
are you sure url is correct one?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 12:13 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 01:17 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 02:29 AM - edited 11-23-2023 02:30 AM
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" />