c# - Get user information in Windows 8? -
i have created sample in windows 8 using c# , xaml user info of system includes name, email id, photo of user login. able name , image not able email id. system logged in hotmail id. following code: how can achieve email id?
string displayname = await userinformation.getdisplaynameasync(); string emailid = await userinformation.getprincipalnameasync(); storagefile image = userinformation.getaccountpicture(accountpicturekind.largeimage) storagefile;
in email id getting blank. how fix it?
@seshuk had given correct answer, msdn documentation
only domain users have principal name. access principal name can blocked privacy settings (for example, if userinformation::nameaccessallowed property false). if access blocked, method returns empty string.
this method requires enterpriseauthentication capability.
a hotmail id, definition, not domain user. additionally, you'd need company account publish such app, since requires enterprise authentication capability.
Comments
Post a Comment