title: How to get the Domain of Current User programmatically in Store Apps
body: <p>We developed an store app it works fine when we deployed in domain2 it not working.As it throwing an error we fixed that error in the domain2 and installed in the domain1 it doesn't work but it working fine in domain2.</p>
  
  <p>I tried using</p>
  
  <pre><code>string dnsName = await Windows.System.UserProfile.UserInformation.GetDomainNameAsync();
  </code></pre>
  
  <p>but it returning empty string</p>
  
  <p>for eg, I'm having two domains like Dev and Test,my need is to get the name as Dev and Test.</p>
  
  <p>any solution or code is provided is much appreciated.</p>