This code sample shows one can verify if a license exists for a given Microsoft Store app.
public static async Task<ReadOnlyDictionary<string, bool>> VerifyAsync(params string[] productIds)
{
using StringContent content = new($"{{\"IdType\":\"ProductId\",\"ProductIds\":[{string.Join(",", productIds.Select(_ => $"\"{_}\""))}]}}", Encoding.UTF8, "application/json");
productIds = (await Client.ParseAsync(RequestUris.Item1, content).ConfigureAwait(false)).Descendants("ProductId").Select(_ => _.Value).ToArray();
using var stream = await Client.GetStreamAsync(string.Format(RequestUris.Item2, string.Join(",", productIds))).ConfigureAwait(false); var source = stream.Parse();
var result = await LicenseManager.GetSatisfactionInfosAsync(source.Ids("ContentIds"), source.Ids("KeyIds")).AsTask().ConfigureAwait(false);