Integrate WOPI with your Microsoft Cloud Storage Partner Program

Implementing WOPI with the Cloud Storage Partner Program may seem daunting at first. One of the key mistakes we see being made is a failure to prepare adequately before commencing programming.

A WOPI integration with your system will likely be very different from any other integration you have attempted in the past. Therefore, to clarify things and help you prepare, we’ve created this brief guide to getting started with WOPI regarding your Office 365 Cloud Storage Partner Program (CSPP).

Cloud Storage Partner Program

The Office 365 Cloud Storage Partner Program offers WOPI, where you can embed Microsoft Office in a web app, integrating Microsoft’s power with your cloud-based storage solution. Even better, this can all be done with minimal effort and in little time.

By utilising WOPI, CSPP enables you to open your Office 365 files from your storage solution, providing direct access to a whole host of advantages that Excel, Word, and PowerPoint offer. To extend your WOPI capability in your web application, consider accessing more special features with the Cloud Storage Partner Program Plus.

Steps for WOPI Integration with Microsoft CSPP

Step 1: Read the WOPI Documents and CSPP Program Requirements

Firstly, we recommend reading all of the WOPI documentation. These documents will help you understand how to implement the WOPI protocol and how you can test this integration.

Next, draw a diagram or two about how your solution will work, then re-read all of the documentation and update your diagrams. Doing this will give you a much better starting point!

Step 2: Create Your Microsoft Cloud Storage Partner Program To-Do List

Your to-do list should look something like this:

  • Implement the host page (don’t forget wd* parameters).
  • Implement Discovery
  • Get basic Validator working in the host page – do this before attempting to get Word, Excel and PowerPoint to work. This step is the biggest part of the work, so expect to spend a couple of weeks doing this.
  • Implement WOPI API and make validator tests pass
  • Get all three required editors working
    • Word
    • Excel
    • PowerPoint

Step 3: Work Out Which WOPI Operations You Would Like to Implement into the Office 365 Cloud Storage Partner Program

The exact operations you will implement will depend on your use case, but our team generally recommend implementing these operations:

  • CheckFileInfo
  • GetFile
  • PutFile
  • PutRelativeFile
  • Lock
  • GetLock
  • Unlock
  • UnlockAndRelock
  • RefreshLock
  • PutUserInfo

You should also support extended Locks and Proof Key validation. Supporting extended Locks is straightforward and will be required further down the line. Supporting Proof Key is also recommended because it is your only method for authenticating inbound WOPI requests from Microsoft.

Top Tips

Below, we’ve compiled a list of our top tips concerning WOPI integration with the Microsoft Cloud Storage Partner Program. They are:

  • Don’t use the code you found on the Internet

Most of it doesn’t work properly, and you won’t be able to debug it when it doesn’t function. Write your own code and understand how WOPI works.

  • Read the documentation

Most people have problems with WOPI because they neglect to read and understand every documentation page.

  • Comply with the documentation

MS will not make an exemption for you.

We’ve all been through the complexity of WOPI and can answer your questions (after you’ve read the documentation!).

  • Be prepared for the complexities that come with WOPI

WOPI is not well-supported or easy to debug, so you should be prepared for this with a really good log on the server-side – check out our blog post on how to troubleshoot WOPI API issues efficiently for more info.

  • Comply with the MS UI guidelines

Most WOPI approval failures are simple errors in UI, so complying with the MS UI guidelines can help you avoid this issue.

  • To minimise your problems, write your WOPI API implementation in one of these languages:
    • C# / .Net Core (the simplest, quickest approach)
    • Java
    • PHP (Proof Key is hard work in PHP, but possible!)
    • Python

The advice outlined above will make much more sense once you’ve read and re-read the documents and drawn relevant diagrams. While this unique type of integration can sometimes be frustrating, we’re certain you’ll get there in the end. After all, WOPI is a complex beast to tame!

Reach out to us to discover more about the Office Cloud Storage Partner Program and how we can help you streamline your CSPP and WOPI integration today.

For more information on WOPI integration and CSPP, check out our blog, where we cover these topics in more detail.

Nick McKenna
Since 2004, Nick McKenna, BSc, MBCS Biography has been the CEO of McKenna Consultants. McKenna Consultants is a bespoke software development based in North Yorkshire, specialising in Cloud development, mobile App development, progressive web App development, systems integration and the Internet of Things development. Nick also holds a First Class Degree in Computer Science (BSc) and wrote his first computer program at the age of nine, on a BBC Micro Model B computer. For the last 21 years, Nick has been a professional computer programmer and software architecture. Nick’s technical expertise includes; Net Core, C#, Microsoft Azure, Asp.Net, RESTful web services, eProcurement, Swift, iOS mobile development, Java, Android mobile development, C++, Internet Of Things and more. In addition, Nick is experienced in Agile coaching, training and consultancy, applying modern Agile management techniques to marketing and running McKenna Consultants, as well as the development of software for clients. Nick is a Certified Enterprise Coach (Scrum Alliance), SAFe Program Consultant (SAI), Certified LeSS Practitioner (LeSS) and Certified Scrum@Scale Practitioner. Outside the office, Nick is a professional scuba diver and he holds the rank of Black Belt 5th Dan in Karate.