Search code examples
c#windows-8winrt-xamlkioskkiosk-mode

Win RT: Caller does not have the EnterpriseAuthentication capability


I have Windows Store Application (Win RT) and I need to get the current user domain name. Here is my code:

name = await Windows.System.UserProfile.UserInformation.GetDomainNameAsync();

But I get exception:

Win RT:  Caller does not have the EnterpriseAuthentication capability

What I need to do to fix it, if I don't have physical device and working in VS ?


Solution

  • Have you checked the UserInformation.NameAccessAllowed flag before calling the GetDomainNameAsync method?

    UPDATE 1: To access the domain name you have to add Enterprise Authentication capability in manifest. Based on the UserInformation.GetDomainNameAsync documentation, It can be empty when the privacy settings related to account info access turned 'Off'. You can check for the privacy settings in your machine's PC settings: Privacy Settings