Skip to main content
Microsoft Dynamics CRM forum
Answered

Unable to Embed SharePoint Document in Custom Page with External Web Page Container

editSubscribe (3) ShareShare
ReportReport
Posted on by 18
Update: as of about 2024-04-29T20:30:00 (UTC) this just started working again for us. Seems like MS fixed whatever broke before we could get to the bottom of it. We had started entering the ticket and in reproducing the steps noticed it had started working. It was definitely still broken as of 2-3 hours ago for our tenant though.
 
Short version: Using the External Web Page Container in a customer page with a URL that points to our SharePoint site. Now we get a page with the Microsoft 365 logo, some text that says /Please sign in to view this file/, and a blue button labeled /Sign in/. Clicking the button causes an auth window to popup and then go away (I am already logged in to CRM online after all) but the page remains the same. Looking at the logs in the F12 developer tools shows that a POST request is made to our SharePoint online tenant to /_api/contextinfo as well as second request to /_api/web/Language - both fail with a 401 unauthorized. I can click the button over and over, never getting authorized. I have tried it in Chrome & Edge and get the error, though oddly enough Firefox seems to work, though it took a couple of refreshes. I also tried turning off Tracking Prevention in Edge which did not resolve the problem. This happens with embedded content from a SharePoint library as well as OneDrive.
 
I am not quite sure if it is a browser issue, a Microsoft servers issue, or possibly a configuration issue. Also, there may be a better way to surface this info (it is currently an Excel sheet with some helpful sales info) so I am open to alternative approaches as well. Here is a screenshot of the Page (with domain obscured) for reference:
 
 
When opening it in a fresh Firefox instance, it does prompt me to allow cookies between the SharePoint and Dynamics domains:
 
//////////
 
and then if I allow them, sign in, then refresh a couple of times it will finally load:
 
//////////
 
And for additional reference, here is the notice in the Issues tab of the F12 developer tools console regarding cookies:
 
////////
 
and here are the settings I tried in Edge:
 
////////
 
It is also worth noting that the SharePoint Site Settings -> HTML Field Security settings include all the various (powerapps.com, dynamics.com, etc.) domains that would be required:
 
//////
 
Attachments
  • GP-30041349-0 Profile Picture
    GP-30041349-0 6 on at
    Unable to Embed SharePoint Document in Custom Page with External Web Page Container
    The issue appears to have been resolved in the late afternoon on 4-29-24.  I checked it again this morning (4-30-24) and it appears to be working properly.
     
     
  • Verified answer
    Unable to Embed SharePoint Document in Custom Page with External Web Page Container
    Update: as of about 2024-04-29T20:30:00 (UTC) this just started working again for us. Seems like MS fixed whatever broke before we could get to the bottom of it. We had started entering the ticket and in reproducing the steps noticed it had started working. It was definitely still broken as of 2-3 hours ago for our tenant though.
  • NS-29042244-0 Profile Picture
    NS-29042244-0 5 on at
    Unable to Embed SharePoint Document in Custom Page with External Web Page Container
    Same issue. Cannot embed microsoft365 excel to any external website. File > Share > Embed and copy Embed code. Paste it in any iframe and the login page displays as described above. Clicking sign in does nothing. 
  • Unable to Embed SharePoint Document in Custom Page with External Web Page Container
  • GP-30041349-0 Profile Picture
    GP-30041349-0 6 on at
    Unable to Embed SharePoint Document in Custom Page with External Web Page Container
    We are having the exact same issue.  We have an Excel online spreadsheet that is stored in Sharepoint Online.  We have it embedded in an HTML file.  Starting the last day or so, instead of the spreadsheet getting displayed, we get the same behavior as you have described.  After reading your post, I tried Firefox and also got the same behavior as you.  After a couple of refreshes it populated in Firefox.  Just wanted to chime in to make it known that this seems to be due to a recent Microsoft or Chromium change.  Also, Edge and Chrome are exhibiting the same behavior.

    Update:  the solution for some could be to eliminate embedding the spreadsheet.  When I take the "https://company.sharepoint.com/sites/........." part of the embed code out of my HTML and paste it into edge, it opens fine.  Not a solution for us because the reason we embedded it in an HTML to begin with was so we could add code to the HTML to auto-refresh the page every 2 minutes.  Hoping to not have to use an auto-refresh browser plugin to get around this.
    ​​​​​​​

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Demystifying Copilot with Sundar Raghavan

Sundar explains how Copilot for Service is meant to function separately...

Business Process Guidance Badges and New…

The Microsoft Success by Design is the framework for implementing Dynamics 365…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,281 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,025 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans