locked
[UWP]UserInformation win10 RRS feed

  • Question

  • Hello,

    I have a win8.1 app that relies on the class UserInformation to get the username and domain name to login.

    I want to run this app in win10 but the class no longer works, is there a alternative way to get this and work on both win8.1 and win10?

    I don't want to convert the project to WUA because I don't want to mantain 2 versions.

    Thank you


    Friday, November 27, 2015 11:41 AM

Answers

All replies

  • Hi,

    Please refer this sample to know how to get user information in UWP app: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/UserInfo

    Hope this helps!

    Friday, November 27, 2015 4:55 PM
  • I Need something that works both in win8.1 and win10, so that's not what I'm looking for.
    Monday, November 30, 2015 12:57 PM
  • Hi pamarques,

    Welcome to the Developing Universal Windows apps forum!

    As a friendly reminder please make sure to add the appropriate tags to the title of your post as per Guide to posting: subject line tags

    Yes, as you said that the UserInformation is not supported in the Windows 10, that is because in Windows 10 apps do not have access to user information without explicit user consent, unlike in Windows 8 where this permission is granted by default, so in Windows 10 we need to use this User class for instead. As far as I known currently it has no API that works both in the Windows 8.1 and Windows 10 to get user information. Maybe you have to create two Apps, one is for the Windows 8.1, the other is for the Windwos 10.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, December 1, 2015 2:17 AM