Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SPUtility.ImportAppLicense method

SharePoint 2013

Imports the specified test license into the specified SharePoint deployment for app testing purposes.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
[ClientCallableMethodAttribute(Name = "ImportAppLicense")]
public static void ImportAppLicense(
	string licenseTokenToImport,
	string contentMarket,
	string billingMarket,
	string appName,
	Uri iconUrl,
	string providerName,
	int appSubtype
)

Parameters

licenseTokenToImport
Type: System.String

An XML fragment that represents the app license token to import.

contentMarket
Type: System.String

The content market in which you want to sell the app.

billingMarket
Type: System.String

The billing market for the app.

appName
Type: System.String

The name of the app.

iconUrl
Type: System.Uri

URL of the app icon, as it appears on Office Store. Can be left blank.

providerName
Type: System.String

Name of the provider of the app.

appSubtype
Type: System.Int32

The subtype of the app.

Use this parameter to specify whether this license is for an app for SharePoint used exclusively to package an app for Office, and if so, the type of app for Office. This enables corporate catalogs to filter and display apps for Office packaged in apps for SharePoint.

Valid values are limited to:

Value

Description

1

An app for SharePoint used to package a single task pane app for Office.

2

An app for SharePoint used to package a single content app for Office.

4

An app for SharePoint used to package a single dictionary task pane app for Office.

5

An app for SharePoint that is not be used exclusively to package an app for Office. This includes:

  • An app for SharePoint that does not contain any apps for Office functionality.

  • An app for SharePoint that, in addition to its SharePoint-specific functionality, installs documents and/or templates that contain one or more apps for Office.

  • An app for SharePoint that packages multiple apps for Office.

In order to call this method, the caller must be one of the following:

  • An administrator of the site collection being called.

  • An administrator of the tenancy into which the license is imported, if the SharePoint deployment into which the license is imported is a tenancy.

  • A farm administrator

To assist in testing the app license checking code in your app, SharePoint enables you to upload up to ten test licenses per SharePoint deployment. These test licenses are XML fragments that conform to the app license schema.

For test licenses, you need not specify the deployment ID in the app license XML. The ImportAppLicense method supplies the correct deployment ID to the license token XML.For more information about the app license XML definition, see App License Schema. For more information about app licenses, see Licensing apps for Office and SharePoint.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.