title: How do I get a symmetric key from Azure ACS?
body: <p>I am having some problems using the ACS Management API and symmetric keys.  When I add a service identity to ACS via the API and setup a symmetric key it seems like ACS is changing the key I am sending in. </p>
  
  <p>If I pass in "xyz123" as my value for a symmetric key... when I go to the ACS management portal and look at that value its a different string; lets say "AHDyDG6236=".</p>
  
  <p>If I ask the API for the value it returns to me "xyz123" (ServiceIdentityKey.Value).</p>
  
  <p>The value you need to login is "AHDyDG6236=" but there is no way to get this value without going to the ACS portal and clicking on the "show key" button?</p>
  
  <p>Is there anyway to get the usable value for a symmetric key without having to go into the ACS management portal?</p>
  
  <p>here is some sample code that illustrates what I am talking about.  Its based off the example found here: <a href="http://msdn.microsoft.com/en-us/library/hh135148.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/hh135148.aspx</a></p>
  
  <pre><code>    var svc = ManagementServiceHelper.CreateManagementServiceClient();
      var password = Encoding.UTF8.GetBytes("password");
      var serviceIdentity = svc.CreateServiceIdentity("testSI", password, ServiceIdentityKeyType.Symmetric, ServiceIdentityKeyUsage.Password);
      serviceIdentity.Description = "service identity for testing";
      svc.SaveChangesBatch();
      var svc2 = ManagementServiceHelper.CreateManagementServiceClient();
      var si = svc2.GetServiceIdentityByName("testSI");
      Console.WriteLine(Encoding.UTF8.GetChars(si.ServiceIdentityKeys[0].Value)); //prints out "password"
  </code></pre>
  
  <p>After you run this code go to ACS portal and click on the symmetric key and then click "show key" and it shows a generated/hashed value... this is the value you need in order to authenticate... but there is no way to get that value from the API?  </p>