The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps, Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[uwp] What unique ids for user are exist in Windows store ? RRS feed

  • Question

  • I want add some logic. But it should be available only for developer (me)

    I want hard code my Microsoft Account Id inside app and add some logic.

    1. One idea is to verify email

    As I can understood I can get user email by such code

     UserDataAccountStore store = await UserDataAccountManager.RequestStoreAsync(UserDataAccountStoreAccessType.AllAccountsReadOnly);

                if (store != null)
                {
                    IReadOnlyList<UserDataAccount> userDataAccounts = await store.FindAccountsAsync();
                    comboBox.DataContext = new ObservableCollection<UserDataAccount>(userDataAccounts);

                    if (userDataAccounts.Count > 0)
                    {
                        comboBox.SelectedIndex = 0;
                    }
                }

    Q1: Is it an easiest way to get this info?

    Q2: What another Unique id user has and how I can get it ?


    Mood Store




    • Edited by SmartWhy Monday, February 13, 2017 11:16 AM
    Monday, February 13, 2017 11:15 AM

Answers

  • Hi SmartWhy,

    >>Q1: Is it an easiest way to get this info?

    As far as I know, it is an easiest way to get the user info using your above code.

    >>Q2: What another Unique id user has and how I can get it ?

    Surely, you can use the email to verify every user. Besides, you can also use the Id in the UserDataAccount instance to identify the user. It uniquely identifies the UserDataAccount on the local device.

    Meanwhile, if it is not the result you want, could you tell me more details what effect do you want to implement?

    Best regards,

    Breeze Liu


    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.

    • Marked as answer by SmartWhy Tuesday, February 14, 2017 11:17 AM
    Tuesday, February 14, 2017 8:49 AM

All replies

  • Hi SmartWhy,

    >>Q1: Is it an easiest way to get this info?

    As far as I know, it is an easiest way to get the user info using your above code.

    >>Q2: What another Unique id user has and how I can get it ?

    Surely, you can use the email to verify every user. Besides, you can also use the Id in the UserDataAccount instance to identify the user. It uniquely identifies the UserDataAccount on the local device.

    Meanwhile, if it is not the result you want, could you tell me more details what effect do you want to implement?

    Best regards,

    Breeze Liu


    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.

    • Marked as answer by SmartWhy Tuesday, February 14, 2017 11:17 AM
    Tuesday, February 14, 2017 8:49 AM
  • >Meanwhile, if it is not the result you want, could you tell me more details what effect do you want to implement?

    Ability to see full and trial version for developer.


    Mood Store

    Tuesday, February 14, 2017 11:17 AM