Cross domain issues with Office Online server 2016

Recently while provisioning a huge SharePoint 2016 farm (around 70 server) on MS-Azure with 3 Office Online servers, I came across some cross domain issues with Office Online.

We had provisioned all the four environments (development, test, pre-prod and production) on Azure but on two different domains and here come the real complexity 🙂

Environment Domain URL
Development PPAD http://sharepointsite-dev
Test PPAD http://sharepointsite-test
Pre-Production AD http://sharepointsite-preprod
Production AD http://sharepointsite

The users who would be accessing the site were using laptops which were on the AD domain; for example, AD\anandsharma being their account ID.

Accessing the development and test URL’s with such devices required appending the domain name after the SharePoint site url to resolve the DNS. For example: http://sharepointsite-dev.ppad

Now while setting up Office Online servers in such cases has a big caveat!!

So let’s say my Office Online server’s load balancer (as in our case) has the internal URL as http://sharepointsite-dev-oos and everything is configured according the the following technet article –

In such a scenario, the cross domain dns resolving will not work.

Hence while configuring the Office online server, you must append the domain name to the internal url property when configuring the new farm.

Configuration on the Office Online Server (Development)

Import-Module -Name OfficeWebApps
New-OfficeWebAppsFarm -InternalURL "http://sharepointsite-dev-oos.ppad" -AllowHttp -EditingEnabled
Set-OfficeWebAppsFarm -AllowHttpSecureStoreConnections:$true

Configuration on the SharePoint Web Front End (Development)

Add-PSSnapin Microsoft.SharePoint.Powershell
New-SPWOPIBinding -ServerName "sharepointsite-dev-oos.ppad" -AllowHTTP
Set-SPWOPIZone -zone "internal-http"
$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$Farm = Get-SPFarm
$Farm.Properties.Add("WopiLegacySoapSupport", "http://sharepointsite-dev-oos.ppad/x/_vti_bin/ExcelServiceInternal.asmx");

Hope this helps anyone struggling with cross domain configurations.