StoreAppLicense Class

Definition

Provides license info for the current app, including licenses for products that are offered by the app.

public ref class StoreAppLicense sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Services.Store.StoreContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class StoreAppLicense final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Services.Store.StoreContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class StoreAppLicense
Public NotInheritable Class StoreAppLicense
Inheritance
Object Platform::Object IInspectable StoreAppLicense
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Services.Store.StoreContract (introduced in v1.0)

Remarks

The StoreContext.GetAppLicenseAsync method returns an object of this type.

Version history

Windows version SDK version Value added
1809 17763 IsDiscLicense

Properties

AddOnLicenses

Gets the collection of licenses for durable add-ons for which the user has entitlements to use. This property does not include licenses for consumable add-ons.

ExpirationDate

Gets the expiration date and time for the app license.

ExtendedJsonData

Gets complete license data in JSON format.

IsActive

Gets a value that indicates whether the license is valid and provides the current user an entitlement to use the app.

IsDiscLicense

Gets a value that indicates whether the current license was acquired from a disc-based installation.

IsTrial

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

IsTrialOwnedByThisUser

Gets a value that indicates whether the current user has an entitlement for the usage-limited trial that is associated with this app license.

SkuStoreId

Gets the Store ID of the licensed app SKU from the Microsoft Store catalog.

TrialTimeRemaining

Gets the remaining time for the usage-limited trial that is associated with this app license.

TrialUniqueId

Gets a unique ID that identifies the combination of the current user and the usage-limited trial that is associated with this app license.

Applies to