none
Getting Microsoft Store account info RRS feed

  • Question

  • Hi.

    We're trying to get information about Microsoft Store Account logged in. We have our own login system within our app and we want to unlock some bonus in-game goods for players for buying our game on Microsoft Store, howerver we want to unlock all this only once per purchase. We don't want groups of people logging in on a single device to their accounts in our game and all getting the bonus. Could you tell us how we can get some unique id for a copy of the game purchased? or the account logged in to the store? 

    The code we have gets the account of the user logged in to the computer, but when a different account is logged in to the store it makes no difference to the result

    here's our code so far:

    IReadOnlyList<User> users = await User.FindAllAsync();   

    var current = users[0];         

    var data = await current.GetPropertyAsync(KnownUserProperties.AccountName);

    string displayName = (string)data;                        

    UnityEngine.WSA.Application.InvokeOnAppThread (() => {TEST.text = displayName;},false);nt;},false);

    Thank you in advance

    Tuesday, March 31, 2020 8:06 AM

All replies

  • Hi Jan Mencfel,

    >Could you tell us how we can get some unique id for a copy of the game purchased? 
    StoreAppLicense provides license info for the app, including properties that indicate whether the user currently has a valid license to use the app (IsActive). You could use GetAppLicenseAsync  menthod to get it. Could you mind to use In app purchase(Add-on) to unlock bouns in your app?An add-on is a product or feature that you make available to your customers in the context of your app.Every app and add-on has an associated license that indicates whether the user is entitled to use the app or add-on.  For more details, please refer to In-app purchases and trials and Get license info for apps and add-ons

    Best regards

    Daisy Tian


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 1, 2020 1:54 AM
    Moderator
  • Thank You, Daisy. 

    I'll try to do it with addons

    Kindest regards

    Jan

    Wednesday, April 1, 2020 6:36 AM
  • Hi Jan,

    You can post here if you have any question. I will pay attention to your thread.

    Best regards

    Daisy  Tian


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 1, 2020 7:39 AM
    Moderator