How to Get Authentication Keys for OneDrive for Business Excel Embeds
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.

- 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 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.
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.
Navigate to your OneDrive for Business account in a web browser and open the Excel file you wish to embed.
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.
Go to 'File' > 'Share' > 'Embed'. Adjust your display options (such as hiding gridlines or row/column headers) and copy the provided iframe code.
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.

Contact Your Microsoft 365 Admin for Access Configuration
If standard public sharing is restricted on your account, your organization's IT administrator must enable external sharing at the tenant level.
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. Download and Install: Visit the official WPS website to download and install WPS Office for free on your device.
- 2. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Microsoft Excel files seamlessly.
- 3. Edit and Share: Use comprehensive editing tools to modify your data and share them easily via direct file transfers or flexible cloud links.

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.




