Reputation: 1338
I am trying to access the UserInformation in a Windows Store App.
Specifically, I would like to get the DisplayName
.
I have updated the app manifest file to include Enterprise Authentication & even tried adding Account Picture Provider in the hope that this would help.
Unfortunately, NameAccessAllowed
always returns false, so GetDisplayNameAsync()
returns an empty string.
Is there some other privilege I need to enable in the manifest perhaps?
Update:
I forgot to mention that I have already tried the User domain name sample.
http://code.msdn.microsoft.com/windowsapps/User-domain-name-sample-85ce3e49
Upvotes: 3
Views: 2103
Reputation: 115
Turning on "Let apps access my name, picture and other account info" option in "PC Settings -> Privacy" Fixed my issue.
Upvotes: 2
Reputation: 31
In Windows security settings you have to allow apps to obtain this information. So NameAccessAllowed will return true.
Upvotes: 1
Reputation: 18863
The problem is if the user does not have a Microsoft Account setup then based on Microsoft's Site
Getting the DisplayName will return Empty String DisplayName and GetDisplayNameAsync()
Upvotes: 1