How to Fix Authentication Prompts When Embedding Anonymous SharePoint and OneDrive PowerPoint Files
Question details
The user needs to embed a PowerPoint presentation in a WordPress iframe using an anonymous sharing link from SharePoint Online or OneDrive for Business, but is encountering unexpected authentication prompts.

- Product
- SharePoint Online / OneDrive for Business
- Device & OS
- not provided
- Scenario
- Embedding a shared PowerPoint presentation onto a public WordPress website so that visitors can view it without needing to log in.
- Observed behavior
- An authentication prompt appears inside the WordPress iframe, even though the raw anonymous sharing link successfully opens the presentation without requiring a login in a standard unauthenticated browser window.
Before proceeding, ensure you have administrative access or site collection admin rights to the SharePoint or OneDrive account, as resolving embedding permissions requires modifying site settings.
Configure HTML Field Security Settings
Adjust your site collection settings to permit iframe embedding from external domains like your WordPress site.
By default, SharePoint and OneDrive for Business may block their content from being embedded in iframes on external websites to prevent clickjacking attacks. Modifying the HTML Field Security settings allows specific external domains to display your files.
Navigate to the site settings of your SharePoint or OneDrive for Business account.
Under the 'Site Collection Administration' section, click on 'HTML Field Security'.
Select the option to either 'Allow contributors to insert iframes from any domain' or explicitly add your WordPress website's domain (e.g., yourdomain.com) to the allowed list, then click 'OK'.

Test with the SharePoint Embed Web Part
Isolate the problem to determine if the issue lies with Microsoft's embedding policies or WordPress's security restrictions.
Verify Tenant External Sharing Policies
Check if your organization's Microsoft 365 tenant policies restrict anonymous external links from rendering.
Create and Share Presentations Easily with WPS Office
If strict Microsoft SharePoint or OneDrive tenant policies make embedding presentations complicated, consider switching to WPS Office. It provides a free, lightweight, and highly compatible alternative to Microsoft Office, allowing you to create, edit, and share presentations without navigating complex administrative barriers.
- 1. Download the Software: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
- 3. Open and Share: Launch WPS Presentation, seamlessly open your existing .pptx files, and use the built-in share feature to generate accessible web links.

Frequently Asked Questions
Why does my anonymous SharePoint link ask for a login in a WordPress iframe?
This happens due to security measures such as Cross-Origin Resource Sharing (CORS) or HTML Field Security policies in SharePoint. Microsoft blocks iframe rendering on external domains by default to protect against clickjacking, meaning the file will prompt for authentication even if the raw link works publicly.
Does clearing the browser cache fix the iframe authentication prompt?
Generally, no. If the raw anonymous link opens correctly in an incognito window but the embedded iframe still prompts for a login, it is a server-side permission or domain security restriction, not a local browser cache issue.
Can I embed OneDrive files in WordPress without a special plugin?
Yes, you can use standard HTML iframe tags. However, you must first ensure that your OneDrive for Business tenant allows external iframe embedding by configuring the HTML Field Security settings to permit your WordPress domain.




