Supporting document editing for business users

Business users require an Office 365 subscription to edit files in Office Online. In order to support this scenario, Office Online requires that hosts specify that a user is a business user when using any actions that include the BUSINESS_USER placeholder value, such as edit, editnew, and view.

When business users open documents for editing, Office Online will validate that they have a valid Office 365 subscription. This may require the user to sign in using a valid Office 365 business account. This account must have an attached Office 365 subscription that includes Office applications.

Indicating that a user is a business user

The first requirement in order to support document editing for business users is to indicate that the user is a business user. Doing this requires the following:

  1. Set the BUSINESS_USER placeholder value on the Office Online action URL. This parameter must always be on the action URL for business users.

  2. Include the LicenseCheckForEditIsEnabled property in the CheckFileInfo response. This property must always be set to true for business users.

  3. Include the HostEditUrl in the CheckFileInfo response. This property must be included in the CheckFileInfo response for business users. The HostEditUrl is used to redirect the user back to the host edit page after the subscription check is completed.

  4. (Optional) You may also optionally include the DownloadUrl in the CheckFileInfo response. If provided, the DownloadUrl is used to provide a direct download link to the file if the user’s subscription check fails.

    Important

    For security purposes, both of these URLs must be served from domains that are on the Redirect domain allow list. If either of the URLs is not on the redirect domain allow list, the flow aborts and the user is directed to Office.com.

Important

If any of the properties above are not set properly, or if the URL values provided are not on the Redirect domain allow list, then the license check flow will fail. If the flow fails, users will be redirected to Office.com.

Validating edit capabilities

When Office Online is loaded for business users, it will check that the user is signed in with an Office 365 business account. If the user is not signed in, they’ll be prompted to sign in.

An image showing the prompt business users will see if they are not signed in with an Office 365 business account.

Figure 14 Business users will be prompted to sign in if they are not signed in with an Office 365 business account when they attempt to edit a document using Office Online

Once signed in, Office Online will verify that the user has a valid Office 365 subscription. After this is verified, Office Online will automatically redirect the user back to the HostEditUrl and the user can edit documents.

If the user has a valid Office 365 account but their subscription does not include Office Online, the user will see a message that their subscription is insufficient.

An image showing the message business users will see if their Office 365 subscription does not include |wac|

Figure 15 Business users will see an error message if their Office 365 subscription does not include Office Online

Tracking users’ subscription status

In the flow described above, the user must always be signed in with a valid Office 365 business account in order to edit documents. This is not an ideal experience since it might require the user to sign in many times.

To provide a better experience for users with Office 365 subscriptions, hosts can implement the PutUserInfo WOPI operation. Office Online will use this operation to pass back user information, including subscription status, to the host. The host can, in turn, pass the UserInfo string back to Office Online on subsequent CheckFileInfo responses for that user. Office Online will use the data in the UserInfo string to determine whether a subscription check is needed, and in most cases will not require the user to sign in. Note that hosts must treat the UserInfo string as an opaque string.

Important

Hosts must treat the UserInfo string as an opaque string.

This approach helps ensure that users are required to sign in to validate their Office 365 subscription as infrequently as possible.

Testing the business user flow

In order to test the business user flow in the Test environment, you must use test Office 365 user accounts provided by Microsoft. These accounts are provided in the Cloud Storage Partner Program Yammer group.

These test accounts are periodically rotated. If you have trouble signing in while testing the business user flow, check that the accounts you’re using are the most recent ones provided.