logo
search
Permission & Access Issues

How to Get Authentication Keys for OneDrive for Business Excel Embeds

Tauseeq MagsiTauseeq Magsi Oct 10, 2026 869 views

Question details

The user wants to know if they can obtain an authentication key to embed an Excel worksheet from OneDrive for Business on a website, similar to the functionality available in OneDrive Personal.

How to Get Authentication Keys for OneDrive for Business Excel Embeds
Product
Microsoft Excel / OneDrive for Business
Device & OS
not provided
Scenario
Embedding an Excel worksheet on a public or internal website for visitors to view.
Observed behavior
OneDrive for Business embed codes do not include a user-accessible authentication key, often resulting in visitors being prompted to sign in to Microsoft 365.
Before you start

Before attempting to embed files for public viewing, verify with your organization's IT department that external sharing and anonymous access are permitted on your Microsoft 365 enterprise account.

Solution 1Recommended

Configure 'Anyone with the link' Sharing Permissions

Use organizational sharing settings to allow public access to your embedded Excel file instead of relying on an authentication key.

OneDrive for Business relies on Microsoft 365 enterprise security policies rather than standard authentication keys. To allow public visitors to view your embedded Excel file without signing in, you must create a public sharing link and apply it to your website's embed code.

1
Open the File in Excel Online

Navigate to your OneDrive for Business account in a web browser and open the Excel file you wish to embed.

2
Generate a Public Sharing Link

Click the 'Share' button in the top right corner. In the link settings, select 'Anyone with the link' to allow anonymous access, then click 'Apply'. Copy this link.

3
Generate the Embed Code

Go to 'File' > 'Share' > 'Embed'. Adjust your display options (such as hiding gridlines or row/column headers) and copy the provided iframe code.

4
Update the Iframe URL

To ensure public access, paste the iframe code into your website's HTML, and replace the URL inside the `src` attribute with the public sharing link you generated in step 2.

Configure 'Anyone with the link' Sharing Permissions
Permission Restrictions: If the 'Anyone with the link' option is disabled or grayed out, your organization's IT policies restrict public sharing. You will need to contact your Microsoft 365 administrator.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Management

If strict sharing and embedding limits in OneDrive for Business are slowing down your workflow, WPS Office offers a free, lightweight, and highly compatible alternative for creating, editing, and sharing your spreadsheets without the enterprise hassle.

  1. 1. Download and Install: Visit the official WPS website to download and install WPS Office for free on your device.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Microsoft Excel files seamlessly.
  3. 3. Edit and Share: Use comprehensive editing tools to modify your data and share them easily via direct file transfers or flexible cloud links.
Highly compatible with Microsoft Excel (.xlsx, .xls) formats for easy sharingFree and lightweight alternative to Microsoft OfficeFamiliar user interface for immediate productivityFlexible local saving and seamless cloud file management
microsoft office alternative - wps office

Frequently Asked Questions

Can I generate an authentication key for OneDrive for Business embeds?

No, unlike OneDrive Personal, OneDrive for Business does not provide a standard, user-accessible authentication key in its embed codes. It strictly relies on organizational sharing permissions and Azure AD authentication.

Why do visitors have to sign in to see my embedded Excel file?

If the sharing link used in the embed code is restricted to 'People in your organization' or specific users, Microsoft 365 will prompt website visitors to log in to verify their identity and access permissions before displaying the file.

How can I embed a OneDrive for Business Excel file without requiring users to log in?

To allow public access, you need to generate an 'Anyone with the link' sharing URL and apply it to your embed iframe. If this option is unavailable, your Microsoft 365 administrator must enable external anonymous sharing for your organization.