Windows 8 uses Live ID as the user name. How do I get this LiveID in C#?
Metro apps by design have restricted access to many information they shouldn't really need, and I think this might be one of them.
WinRT gives access to Windows.System.UserProfile.UserInformation
class (as CodeCaster suggested), but as I checked, from all the methods there only GetDisplayNameAsync()
might return live id (email) and it's only if the first/last name are not set on the account.
(Also, most of the methods in this class require setting Enterprise Authentication capability, which is not really welcome in the Store. And the documentation of the class is currently poor.)
For single-sign-on experience, you might rather use Live Software Development Kit.
Take a look at the following post:
http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx
also on previous questions:
Perhaps Windows.System.UserProfile.UserInformation contain some relevant data.
© 2022 - 2024 — McMap. All rights reserved.