Error when opening in browser some ext (.docx, .docm, .xlsx, .pptx) using Office Online Server on-prem linked with SharePoint 2016 on-prem

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/249686

Question

The OOS providing services to the SP 2016 farm has EditingEnabled:False and I can view in browser .pdf/.doc but I can not view in browser docx/docm/xlsx/pptx as it gives me an error of "Sorry, you don't have a license to edit documents with....". I want the same behavior for these ext as the one for .pdf/.doc, to view in browser. I looked into the wopi-discovery action names for these ext to compare between them to se if I find any difference between .doc and .docx that can light up a way to fix this but I didn't find it. Is there a way to resolve this issue?

Was it helpful?

Solution 2

I discovered I was having this issue in a document library but didn't have the issue in the search when returning the same documents as results, so that behavior was only in the document library and I fixed it by going to Library Settings>Advanced Settings and in the section of "Opening Documents in the Browser" the option selected for "Default open behavior for browser-enabled documents" was "Use the server default (Open in the client application)" and I changed it to "Open in the browser". Then click Ok at the bottom to save my changes. After this, all Office extensions are opening in browser by default when you click on the file name.

OTHER TIPS

With '-EditingEnabled:$false' during the configuration of OOS, you need to configure SharePoint licensing to allow users to access the appropriate components of SharePoint, but not allow editing in OOS.

You'll need to use a couple of PowerShell commands to achieve what you want. these are 'New-SPUserLicenseMapping' and 'Add-SPUserLicenseMapping'. To get a list of supported SharePoint user licenses from the SharePoint farm, use 'Get-SPUserLicense'.

The commands to use are:

Get-SPUserLicense

This returns the list of available user license types. This is usually Enterprise, Standard, Project and OfficeWebAppsEdit.

$lmap = New-SPUserLicenseMapping -SecurityGroup "Domain Users" -License Enterprise

This creates a license mapping object that we'll use in a moment. In this example, I'm allowing all domain users access to the SharePoint Enterprise features, but NOT OfficeWebAppsEdit.

$lmap | Add-SPUserLicenseMapping

This applies the user mapping object to the farm.

Enable-SPUserLicensing

This enables user licensing (note that this is a required step and the previous configuration steps won't do anything until this last command is run).

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top