OOS Integration with SharePoint Server 2013/2016

In this article I have put together the basic steps to configure a basic Office Online Server Farm and integrate it with SharePoint 2013/2016 Farm.

The steps given are on the assumption that you have a SharePoint 2013/2016 Farm installed, configured, up and running.

  1. First Step is to install pre-requisites and enable required roles and features for Office online Server:

OOS Prerequisites, resource planning guidelines can be found here: OOS Planning. Please read through this article before you deploy OOS.

       Once you are done through planning, deploying VM's with suitable hardware and ready to deploy OOS, proceed to next step.

        a. Enable the required Roles and Features on the Server.

         There are certain roles and features required on the Servers to deploy OOS. Follow the PS commands below for enabling these roles and features.

Open Windows Powershell as administrator and run following command.

For Windows Server 2012 R2:

  Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices,NET-Framework-Features,NET-Framework-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45,Windows-Identity-Foundation,Server-Media-Foundation 

For Windows Server 2016:

  Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,NET-Framework-Features,NET-Framework-45-Features,NET-Framework-Core,NET-Framework-45-Core,NET-HTTP-Activation,NET-Non-HTTP-Activ,NET-WCF-HTTP-Activation45,Windows-Identity-Foundation,Server-Media-Foundation
 

Once prompted, restart the server.

      b. Install the pre-requisites:

       Install the following pre-requisites:

       Repeat the installation process on all servers that need to be added to OOS Farm.

2.  Install Office Online Server and language packs for OOS:

      a. Download and install OOS:

Download OOS from VLSC Portal. Download is located under Office Products. Once downloaded, install OOS by running setup.exe.

****           b. Download and install OOS Server Language Packs:****

          Download and install Office Online Server Language Packs from here.

Repeat the installation process on all servers that need to be added to OOS Farm.

3.  Deploy the Office Online Server Farm:  

      We can either have a multi-server load balanced farm that uses HTTPS or a single-server farm that uses HTTP or HTTPS. New-OfficeWebAppsFarm is the command used to configure an OOS Farm.

Note: Various parameters that can be used is explained here: New-OfficeWebAppsFarm

If Windows PowerShell Prompt doesn't recognize New-SPWebAppsFarm command, you need to run "Import-Module -Name OfficeWebApps"

              a. For configuring a single-server farm that use HTTP, run the following command:   

          New-OfficeWebAppsFarm -InternalURL "https://servername" -AllowHttp -EditingEnabled
  1. To verify that the Farm is created, we can try opening the Wopi Discovery XML file by accessing URL: https://servername/hosting/discovery

        Note: Configuring OOS Farm using HTTP is not recommended for Production Farms.

    b. For configuring a single-server farm that use HTTPS, run the following command

  2.  New-OfficeWebAppsFarm -InternalUrl "https://server.yourdomain.com" -ExternalUrl "https://hostname.yourdomain.com" -CertificateName "OfficeWebApps Certificate" -EditingEnabled 
    

    Note that -External URL is the URL that should be accessible on internet and -Internal URL is the FQDN of the OOS Server.

    Do not use Self Signed Certificate here. Use a Certificate obtained from a valid Certificate Authority.

    To verify that the OOS Farm is created, access the URL: https://server.yourdomain.com/hosting/discovery. The WOPI Discovery XML File should be accessible.

          c. For configuring a multi-server load balanced OOS Farm using HTTPS:

           On the First Server in the Farm run the following command:

           New-OfficeWebAppsFarm -InternalUrl "https://server.yourdomain.com" -ExternalUrl "https://hostname.yourdomain.com" -SSLOffloaded -EditingEnabled 
    

          This is in assumption that you have SSL Offloading in place on NLB and certificates are placed on NLB.

           On the remaining servers which you want to join to this OOS farm, run the following command:

          New-OfficeWebAppsMachine -MachineToJoin "server1.yourdomain.com"  
    

    Note: We need to include -EditingEnabled in the New-OfficeWebAppsFarm command line to enable users to edit the documents.

    Once the Servers are joined to the farm, we are good to integrate the SharePoint Farm and OOS Farm.

  3. 4. Integrating OOS with your SharePoint Farm:

  4. Once you have the OOS Farm up, you can proceed integrating SharePoint Farm with OOS. Please note that you need to have claims aware web applications for the Office Online rendering and editing to work. Also make a note that System Account won't be able to preview or open the document via OOS. Make sure you use an account other that the System Account.

  5.     a. If you have a single-server OOS Farm that use HTTP:
             Open SharePoint Management shell using Administrator and run the following command:

              New-SPWOPIBinding -ServerName <OOSServerName> -AllowHTTP 
    

         Since you are using HTTP to communicate to the host in OOS(see step 3.a), the WopiZone should be specified as HTTP.
         To verify which zone you are using in SharePoint, use command Get-SPWopiZone. If the output returned for this command is internal-https, change it to internal-http by running the following command:

             Set-SPWOPIZone -zone "internal-http"  
    

      Also, since you are using HTTP, we need to allow OAuth over HTTP in the security token config as well.

            Check what is set in your farm by running (Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

            If it returns false, set it to true by running following command:

               $config = (Get-SPSecurityTokenServiceConfig)  


                 $config.AllowOAuthOverHttp = $true 


                 $config.Update()  

             b. If you have single-server or multi-server OOS Farm that use HTTPS:

              For adding a new binding run the following command, where OOSServerhostname is the hostname specified in the internal url

               New-SPWOPIBinding -ServerName <OOSServerhostname> 

If SharePoint Farm is used externally as well, you will have to set the WopiZone to external-https. You can use the following command to change the zone as required:

                  Set-SPWOPIZone -zone "external-https"  

In case you want to disjoin a SharePoint Farm from OOS Farm, use the command below:

                  Remove-SPWOPIBinding -All:$true 

Note:

Please note that steps given above are for basic OOS Setup. Additional configuration will be needed for Excel Online, Scheduled Data Refresh etc… Please refer the following articles for details on this.

Ref: /en-us/officeonlineserver/configure-excel-online-administrative-settings https://docs.microsoft.com/en-us/officeonlineserver/configure-office-online-server-for-sharepoint-server-2016/configure-office-online-server-for-sharepoint-server-2016#step-4-enable-the-excel-soap-api