Share via

LicenseInformation Class


Provides access to the current app's license metadata.

public ref class LicenseInformation sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class LicenseInformation final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class LicenseInformation
Public NotInheritable Class LicenseInformation
Object Platform::Object IInspectable LicenseInformation

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)


For app trial versions of an app, IsActive will return true so long as the trial hasn’t expired. During the trial period the IsTrial returns true; returning false when the customer upgrades to the full version of the app.

You access this object through the LicenseInformation property of the CurrentAppSimulator object during testing, or the LicenseInformation property of the CurrentApp object when the app is distributed through the Microsoft Store.


The CurrentApp object obtains its data from the Microsoft Store, which requires that you have a Microsoft Store developer account and that the app has been published in the Microsoft Store. If you don't have a Microsoft Store developer account, you can test the functions of this class by using the CurrentAppSimulator.



Gets the license expiration date and time relative to the system clock.


Gets a value that indicates whether the license is active.


Gets a value that indicates whether the license is a trial license.


Gets the associative list of licenses for in-app products that the user is currently entitled to.



Raises a notification event when the status of the app's license changes.

Applies to

See also