How to get a unique userid in Microsoft Store API

86 views Asked by At

I use the Microsoft Store API (henceforth "API) for enable user for in-app purchases (Addons).

For example...

public StoreContext storeContext = StoreContext.GetDefault();
GetAppLicenseAsync();
GetAssociatedStoreProductsAsync

  ...etc...

I have two questions:

  1. Is there an API that lets us identify the unique user; preferably the email id or GUID used by the Store to uniquely identify the user?

  2. The API allows determination of user's currently owned Addons. Is there a way to determine a users past history of Addon ownership?

I have found GetUserCollectionAsync() but it only reflects user's current active purchased Addons. Expired Addons do not appear in this list.

Thank you for your advice.

2

There are 2 answers

3
Roy Li - MSFT On BEST ANSWER

Is there an API that lets us identify the unique user; preferably the email id or GUID used by the Store to uniquely identify the user?

No, UWP doesn't have APIs to do this.

The API allows determination of user's currently owned Addons. Is there a way to determine a users past history of Addon ownership?

No, the StoreContext class does not provide methods that could check user history of addons.

0
Tino On

already more information regarding to this topic?

I am going through something similar, see my post: Microsoft Store API C# Postman interaction using Bearer token from Azure AD

Microsoft hardly has support in this. The thing is while your app is not certified you cannot test your assumptions to see if you have more options using the api after the app has been certified but also here, one requirement might be that the app is working before its certified. This seems to be a flaw in the developers process.

In the meantime after being rejected I try to resubmit my app again with some more content and on the front-page of the app some description/questions, hopefully they might understand that I cannot continue while they read the description on my app home page. Why would I continue with making all the ap content perfect while my architecture is not finished yet and I cannot even test/debug this. This seems like poor process design. In Visual Studio there was also a publishing option in UWP to once the app is certified to link the app to the published app in the app store so testing might be easier but in Maui this option doesnt seem to be there neither.

Kind regards, V