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

SPUtility.GetAppLicenseInformation method

SharePoint 2013

Returns a collection of all the app licenses assigned to the current user for the specified app for SharePoint in the given SharePoint deployment.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ClientCallableMethodAttribute(Name = "GetAppLicenseInformation", OperationType = OperationType.Read)]
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static SPAppLicenseCollection GetAppLicenseInformation(
	Guid productId
)

Parameters

productId
Type: System.Guid

The product ID of the app.

Return value

Type: Microsoft.SharePoint.SPAppLicenseCollection
A collection of all the app licenses assigned to the current user for the specified app for SharePoint.

A user can have multiple app licenses assigned to them for the same app for in a given SharePoint deployment.

If multiple licenses are purchased for the same app, using different Microsoft accounts, the licenses are returned in the following order of priority:

  • Paid

  • Free

  • Unexpired Trial

  • Expired Trial

The GetAppLicenseInformation method does not return licenses with expired or preserved tokens. Preserved tokens are the license tokens which cannot be renewed automatically by SharePoint; in order to remain valid, preserved tokens must be renewed manually by having the purchaser sign in to the Office Store.

The product ID of an app can be found in the app manifest.

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.