81 out of 125 rated this helpful - Rate this topic

Licensing apps for Office and SharePoint

apps for Office and SharePoint

Published: July 16, 2012

Conceptual overview topic

Learn how you can use the app license framework for apps for Office and SharePoint to verify and enforce legal use of your apps that are downloaded from the Office Store.

Applies to:  apps for Office | apps for SharePoint | Office 2013 | Office 365 | SharePoint Foundation 2013 | SharePoint Server 2013 

The licensing framework for apps for Office and SharePoint gives you a way to include code in your apps to verify and enforce their legal use. You can restrict access to your apps to only those users who have a valid license, or specify which features are available, how the app behaves, or other logic, based on the properties of that license. If you plan to sell your app, you should build in logic that uses the licensing framework to determine whether a user has a valid license for the app, and give access to its features based on the license's properties.

The app license framework itself does not enforce app licenses. It's a structure in which you can add code to your apps to retrieve and then act on license information.

The app license framework applies only to apps acquired directly from the Office Store or apps from the Office Store that are made available in an app catalog hosted on SharePoint 2013. Apps made available in other ways—such as from a file system location, or uploaded directly to an app catalog hosted on SharePoint—cannot use the app license framework.

The Office and SharePoint 2013 app license framework includes:

  • The Office Store—a site where users can acquire licensed apps for Office and SharePoint. The Office Store handles payment and issues licenses.

  • Storage of licenses, and renewal of app license tokens.

  • APIs you can use to get license information.

  • A web service you can use to verify whether a license is valid.

  • Specifically for apps for SharePoint, SharePoint 2013 provides an administration user interface for app license management, where an app purchaser can assign the license to a user, and also delegate to other users how the license is managed.

An app license is a digital set of verifiable information stating usage rights of an app for Office or app for SharePoint:

  • The information is verifiable in that you can query the Office Store to check on an app license validity.

  • These usage rights include whether an app is for purchase or is free, whether the app is available on a per-user or site basis, and whether the app is a trial or full version.

The app license categories used by the Office Store are based on how or whether you pay for them and on their scope: Free, Trial, Paid, and Site. Apps for Office can be Free, Trial, or Paid; apps for SharePoint can be Free, Trial, Paid, or Site.

When a user acquires an app from the Office Store or an app catalog—either paid, free, or as a trial—that user is also acquiring the app’s license. The Office Store downloads a version of that app license—an app license token—to your SharePoint installation or Office application, as applicable. The Office Store retains a record of each app license for verification and disaster recovery purposes.

Each app license applies to the specific user, for that specific app.

Information specific to apps for Office

For apps for Office, this means that a licensed user can access and use the app in any Office application instance that it applies to.

Information specific to apps for SharePoint

For apps for SharePoint, each app license applies to a specific app for a specific SharePoint deployment. A user with a license for an app can use that app on any site for that particular SharePoint deployment.

For apps for SharePoint that have a per-user license, each app license can be assigned to the specified number of SharePoint users. The app license applies only to the specified SharePoint deployment and the specified users.

For apps with a site license, that license is assigned to all users on that deployment automatically.

For a detailed overview of app licenses, including how users acquire licenses, app license assignment, duration, and scope, see How app licenses work for apps for Office and SharePoint.

The app license framework provides a way for app developers to customize app access and behavior based on license information. The following is the general pattern for performing app license checks.

First, decide what user actions you want to control or customize based on license information. For example, you might want to check that the user has a valid license each time the user launches the app. For each action, add code for that event that performs a license check. The license checking code retrieves the app license token.

Information specific to apps for Office

For apps for Office, when the app is launched and the Office application requests the app home page, the Office application passes the license token as a query parameter in the HTTP request. The app code must extract and cache this information, so that the license checking code in the app can later access it.

Information specific to apps for SharePoint

For apps for SharePoint, the app’s license checking code queries the SharePoint deployment for the license token.

After the app receives the app license token, the app must pass it to the Office Store verification web service to determine that the license is valid and the information it contains is accurate. The verification service returns whether the license is valid and the license attribute values. The app code can then take appropriate action, based on whether the license is valid and on the license information.

The Office Store verification service does not support being called from client-side code.

Information specific to apps for Office

For apps for Office, you are required to use server-side code to query the Office Store verification web service.

Information specific to apps for SharePoint

For apps for SharePoint, if you are hosting your app pages on SharePoint, you can use the SharePoint web proxy to make JavaScript calls to the Office Store verification service. However, for security reasons we strongly recommend that you only use server-side code to query the Office Store verification web service.

The figure below shows the app license query and validation process for apps for Office. When the user launches the app, the Office application containing the app requests the app home page, appending the app license token to the HTTP request as a query string parameter. The app code extracts and caches the license token. When the app needs to verify the license token, it uses server-side code to pass the token to the Office Store verification service. The verification service returns whether the license token is valid, and if it is, also returns the license properties. The app can then take action, based on the validity of the license and its properties.

Office app license verification process

The following figure shows the app license query and validation process for apps for SharePoint. When the app needs to verify a user’s app license, it uses server-side code to query SharePoint, via the client object model, for the app license token. It then passes that token to the Office Store verification service. The verification service returns whether the license token is valid, and if it is, also returns the license properties. The app can then take action, based on the validity of the license and its properties.

SharePoint app license verification process
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.