title: Getting secret from Azure key vault
body: <p>I'm trying to get secret from azure key vault.</p>
  
  <p>So i found the code below but got an error.</p>
  
  <pre><code>AppServiceMSICredentials credentials = new AppServiceMSICredentials(AzureEnvironment.AZURE);
  
  KeyVaultClient keyVaultClient = new KeyVaultClient(credentials);
  
  String secret =  keyVaultClient.getSecret("uri", "secretName").value(); 
  </code></pre>
  
  <p>I got an error like this:</p>
  
  <pre><code>Error &gt;&gt;&gt; endpoint == null
  </code></pre>
  
  <p>I also tried this way:</p>
  
  <pre><code>
  AppServiceMSICredentials credentials = new AppServiceMSICredentials(AzureEnvironment.AZURE, "MSI Url????", "secret???");
  KeyVaultClient keyVaultClient = new KeyVaultClient(credentials);
  
  String secret =  keyVaultClient.getSecret("keyVault Uri", "secret name").value(); 
  
  log.debug("secret=========",secret);
  </code></pre>
  
  <p>I'm new to Azure and now i cannot find the solutions....</p>
  
  <p>How can i solve it?
  Also how can i find msi endpoint and secret??</p>
  
  <p>Thank you.</p>