Licensing apps for Office and SharePoint
Published: July 16, 2012

Learn about 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
In this article
Introduction to licensing apps for Office and SharePoint
What are app licenses?
How users acquire app licenses
How app developers can use license information
Additional resources
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. 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. If you plan to sell your app, you can 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 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.
Note |
|---|
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 a app catalog hosted on SharePoint—cannot use the app license framework. |
The app licensing framework gives you a way to restrict access to your apps to only those users who have a valid license, and to specify app behavior or other logic based on the properties of that license. For example, you can build logic into your apps that controls which app features a user can access or app behavior, based on the type of app license a user has.
At its most basic, an app license is a digital set of verifiable information stating usage rights of an app for Office or app for SharePoint. 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.
App license types for apps for SharePoint
SharePoint 2013 maps the license categories used by the Office Store to app license types, based on user access. The following table shows how the SharePoint app license types map to the classifications used by the Office Store.
SharePoint license type | Office Store license category | License applies to | Duration | Users | Cost |
|---|---|---|---|---|---|
Perpetual all user | Free Paid Site | All users of a SharePoint deployment, with no expiration. | Perpetual | Unlimited | Free or paid |
Perpetual multiuser | Paid | Per user, with no expiration. | Perpetual | N (per user) | Paid |
Trial all user | Trial Site | All users of a SharePoint deployment. Can have a set expiration date. | 15, 30, 60 days, or unlimited | Unlimited | Free |
Trial multiuser | Trial | Per user. Can have a set expiration date. | 15, 30, 60 days, or unlimited | N (per user) | Free |
When a user acquires an app—either paid, free, or as a trial—that user is also acquiring the app’s license.
To acquire the use of an app, a user browses the Office Store, selects the app, and then logs into the Office Store using their Microsoft account. When the purchaser acquires the app—whether for free, payment, or as a trial app—the Office Store generates the appropriate app license and downloads a token representing the license to the purchaser’s environment, as described below.
| For apps for Office, the Office Store downloads the license token and stores it in the purchaser’s Office client application. The purchaser of the app can then access and use the app. |
| For apps for SharePoint, the license token is downloaded and stored in the purchaser’s SharePoint deployment. For apps for SharePoint, only site, tenant, or farm administrators can purchase app licenses, as only users with those roles have sufficient privileges to install an app in a site. Therefore, in many cases, the person acquiring the app is an administrator or purchasing agent, not the person who will actually use the app. The app's purchaser can then manage the app license, assign those app licenses to other users within their deployment, and enable other users to manage the licenses. A user who is assigned an app license can access and use the app. |
The Office Store retains a record of each app license for verification and disaster recovery purposes.
Note |
|---|
The app license framework is only available to apps acquired directly from the Office Store or apps from the Office Store that are made available in a app catalog hosted on SharePoint 2013. Apps made available in other ways, such as from a file system location, or uploaded directly to a app catalog hosted on SharePoint, cannot employ the app license framework. |
Acquiring an app license from the Office Store
Figure 1 shows the app license acquisition process for apps for Office when the app is acquired directly from the Office Store. When the user acquires the app, the Office Store generates an app license, which it retains, and downloads a corresponding app license token to the Office application. The user can then access the app.

Acquiring an app license from an app catalog
Figure 2 shows the app license acquisition process for apps for Office; this time the user acquires the app from an app catalog hosted on SharePoint 2013. When the user acquires the app, the app catalog contacts the Office Store for the appropriate app license. The Office Store generates the app license, which it retains, and returns a corresponding app license token, which the app catalog downloads to the Office application. The user can then access the app.

Acquiring an app license for an app for SharePoint
Figure 3 shows the app license acquisition and assignment process for apps for SharePoint. A user, who may or may not be one of the people who will actually use the app, acquires the app, either directly from the Office Store or an app catalog hosted on SharePoint 15. The Office Store generates the appropriate app license, which it contains, and downloads a corresponding app license token to the SharePoint deployment from which the app was acquired. The user can then manage and assign the license to one or more users, based on the license type.

App license duration and app license token expiration
When you acquire an app license from the Office Store, the Office Store downloads a version of that app license—an app license token—to your SharePoint installation or Office application, as applicable. For security reasons, app license tokens expire and must be renewed periodically.
The expiration of the app license, stored in the Office Store, is determined by the terms of the app acquisition. For example, apps with a perpetual license type do not expire. Trial apps, however, do expire if they have a specified expiration date.
| For apps for Office, the Office application checks the license token each time the user launches the app, and renews the token if needed. |
| For apps for SharePoint, the license token is renewed by SharePoint as part of a preset timer job. Users can also manually renew an app license, for example, as part of a disaster recovery scenario. |
App license scope in apps for Office
Each app license applies to the specific user, for that specific app. 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. For example, the user can use the app across multiple computers, each with a separate instance of the applicable Office application installed. When a user launches an Office application, and signs in with their Microsoft account, the Office application queries the Office Store for a list of the apps that user is licensed to use.
App license scope and the deployment ID for 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. In general, for the purpose of app licenses, deployment is defined as the SharePoint farm for on-premises SharePoint installations, and the tenancy for SharePoint Online in Office 365.
Deployment scope can vary, however, based on the configuration of the on-premises SharePoint installation. App license tokens are stored in the App Management Shared Service; therefore, the actual scope of an app license is determined by the configuration of the App Management Shared Service. A given SharePoint installation could contain multiple web applications using different instances of the App Management Shared Service, and possibly using a federated service. In addition, an on-premises SharePoint installation might be configured for multitenancy, is which case a single instance of the App Management Shared Service might have multiple deployment IDs.
The deployment ID of the SharePoint installation to which an app license applies is included in each app license. The deployment ID is a GUID generated by SharePoint and recorded by the Office Store the first time anyone from a specific SharePoint installation visits the Office Store site.
For on-premises SharePoint installations, you can set the deployment ID via Windows PowerShell, for disaster recovery or test/production environment scenarios.
App license assignment for apps for SharePoint
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.The purchaser of the app license can use the SharePoint user interface to manage the app licenses he or she acquired, including assigning licenses to users and designating other users who can manage the app licenses. You cannot programmatically assign app licenses.
As mentioned earlier, the app license framework does not enforce app licenses, but does provide 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.
When the user launches the app or takes some other action within the app that you want to customize, you add code for that event that performs a license check. The license checking code retrieves the app license token.
| 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. |
| 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 passes 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.
| For apps for Office, you are required to use server-side code to query the Office Store verification web service. |
| 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. |
Figure 4 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.

Figure 5 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.

Date | Description |
|---|---|
July 16, 2012 | Initial publication |
Note 
