How to Restrict SharePoint Guests to Browser-Only File Viewing
Question details
The user wants to prevent SharePoint guest users from opening documents in desktop Office applications, forcing them to view files exclusively within the web browser.

- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Managing external guest access to ensure read-only users cannot open or manipulate shared files using local desktop applications.
- Observed behavior
- Read-only guest users open documents in desktop Office apps by default. Modifying custom permission levels to remove the 'Open in app' option prevents users from opening files at all when clicking the document name.
Verify your current Microsoft 365 licensing, as advanced session controls and Conditional Access policies typically require Azure AD Premium P1 or P2 licenses.
Enforce Browser-Only Access via Azure AD Conditional Access
Use Azure Active Directory Conditional Access policies to enforce session restrictions, which is the Microsoft-supported method for forcing browser-only views.
SharePoint does not provide a supported out-of-the-box permission setting that cleanly forces guest users to open files only in a browser without breaking the file links. The most robust and supported method is utilizing Azure AD Conditional Access combined with SharePoint Online session controls.
Sign in to the Microsoft Endpoint Manager or Azure portal using an account with Conditional Access Administrator privileges.
Navigate to Azure Active Directory > Security > Conditional Access, and click on 'New policy' to create a rule targeting external guest users.
Under the 'Cloud apps or actions' section, select 'Office 365 SharePoint Online'. Then, navigate to 'Session', check 'Use app enforced restrictions', and save the policy.
Use the SharePoint Online Management Shell to run the PowerShell command 'Set-SPOTenant -ConditionalAccessPolicy AllowLimitedAccess' to block downloading, printing, and syncing, effectively forcing a browser-only view.

Seek Custom Development Guidance on Microsoft Q&A
If Conditional Access is not an option due to licensing constraints, consult the Microsoft community for custom development alternatives.
Try WPS Office for Secure and Lightweight Document Management
If configuring complex SharePoint permissions and Azure AD Conditional Access policies is too cumbersome or requires expensive licenses, consider handling your sensitive internal documents with WPS Office. It provides a lightweight, highly compatible, and user-friendly experience for your daily productivity needs.

Frequently Asked Questions
Can I simply remove the 'Open in app' button using SharePoint custom permissions?
While you can uncheck the 'Open Items' permission in a custom permission level, this is not recommended. It often prevents users from being able to open the file at all by clicking its name, rather than gracefully falling back to the browser viewer.
Does enforcing browser-only viewing in SharePoint require additional licenses?
Yes, implementing the officially supported method (Azure AD Conditional Access with app-enforced restrictions) requires an Azure AD Premium P1 or P2 license.
Will guest users still be able to download the files if restricted to the browser?
If you configure SharePoint session controls alongside Conditional Access to 'Allow limited, web-only access', it will actively block downloading, printing, and syncing, ensuring the file remains in the browser only.




