Is there a supported way to embed editable SharePoint Word documents in a third-party web application?

Sashakt Pathak 20 Reputation points
2025-12-18T09:56:49.17+00:00

Scenario

We have a SharePoint Online tenant managed by our organization. Word documents are stored in SharePoint document libraries, and users have appropriate permissions (view/edit) assigned via Microsoft Entra ID.

We are building a custom web application hosted on our own domain (not SharePoint) and want to embed SharePoint-hosted Word documents directly in our application so users can:

  • View the document inline
  • Edit the document inline (Word Online experience)
  • Support co-authoring and version history
  • Respect existing SharePoint permissions

What we have tried

1. Iframe embedding using Share → Embed

  • Works for read-only viewing
  • Editing is disabled in embedded mode

2. Direct iframe with edit action URL

  • Using URLs like /_layouts/15/WopiFrame.aspx?sourcedoc=...&action=edit
  • Results in CSP frame-ancestors errors
  • Browser console shows the iframe is blocked

Questions

  1. Is there any supported configuration (tenant-level, app registration, or otherwise) that allows editable Word Online embedding in a non-Microsoft domain?
  2. Is SharePoint Embedded designed to solve this use case, or does it also require pop-out editing?
  3. Are there any planned features or roadmap items that would enable this scenario?
  4. What is the officially recommended architecture for applications that need inline document editing with SharePoint as the storage backend?
Microsoft 365 and Office | SharePoint | Development
0 comments No comments

Answer accepted by question author
Steven-N 25,315 Reputation points Microsoft External Staff Moderator
2025-12-18T12:51:04.19+00:00

Hi Sashakt Pathak

Thank you for reaching out to Microsoft Q&A forum

Based on your description, I understand that you want to embed Word documents stored in SharePoint Online into a custom web application on a non‑Microsoft domain, and you specifically need inline viewing, inline editing through Word Online, co‑authoring, version history, and full respect of SharePoint permissions.

I have conducted some research and found some information that may answer your questions; however, I would like to note that the information below is based on my personal experience and knowledge, as well as the sources I could find. As a forum moderator, I have certain limitations in the testing environment and access to resources for certain tasks. I hope you find the information I provide useful.

Regarding your questions:

1/ Is there any supported configuration (tenant-level, app registration, or otherwise) that allows editable Word Online embedding in a non-Microsoft domain?
Currently, there is no supported configuration at tenant‑level, app registration, or exemption that allows Word Online editing to be embedded inside an iframe on an external (non‑Microsoft) domain. SharePoint Online and Office for the Web explicitly block this scenario through CSP frame‑ancestors restrictions, and this behavior cannot be overridden.

As states in:

https://learn.microsoft.com/en-us/answers/questions/2277956/changing-x-frame-or-content-security-policy-option

https://stackoverflow.com/questions/67628448/sharepoint-ms-wopi-client-refuses-to-frame-to-an-iframe-when-editing-but-it-doe

Note: Microsoft is providing this information as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.

2. Is SharePoint Embedded designed to solve this use case, or does it also require pop‑out editing?

As far I know, SharePoint Embedded supports Office for the Web editing and co-authoring, but it does not provide an editable iframe that can be hosted inside your own domain. Editing still launches the standard Office for the Web interface, meaning the editor runs from Microsoft’s domain, not embedded inside your custom page.

Link references:

https://learn.microsoft.com/en-us/sharepoint/dev/embedded/development/content-experiences/office-experience

https://github.com/SharePoint/sp-dev-docs/issues/10526

3. Are there any planned features or roadmap items that will enable editable embedding?

At this time, Microsoft has not announced any roadmap item that would enable editable Word Online iframe embedding on external domains. Microsoft’s direction is centered on Graph API + SharePoint Embedded rather than relaxing CSP for Office editing.

Link references:

https://techcommunity.microsoft.com/blog/sharepoint_embedded/announcing-sharepoint-embedded-public-preview-at-espc23/3993428

4. What is the officially recommended architecture for applications needing inline document editing with SharePoint as backend?

Microsoft’s recommended architecture is:

  1. Use SharePoint Online or SharePoint Embedded as the storage backend (via Microsoft Graph).
  2. Embed only read‑only previews using Graph’s driveItem/preview API if inline display is needed.
  3. Launch editing via Office for the Web using the document’s webUrl or share link, which opens in the Office domain (new tab, popup, or Microsoft‑hosted frame).
  4. Allow SharePoint to manage permissions, co‑authoring, autosave, versioning, and compliance natively.

For your information:

https://learn.microsoft.com/en-us/graph/api/driveitem-preview?view=graph-rest-1.0

https://learn.microsoft.com/en-us/troubleshoot/sharepoint/sites/cannot-display-sharepoint-pages-in-iframe

Hope my answer will help you.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.