title: Azure App Services - Can't find certificate by thumbprint
body: <p>I have a B1 App Service in Azure and I've installed my certificate in it as shown below:
  <a href="https://i.stack.imgur.com/D5SmH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/D5SmH.png" alt="enter image description here"></a></p>
  
  <p>When I try to get the certificate, it can't find it. As if no certificates are installed. Here's my code:</p>
  
  <pre><code>using (X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
  {
      certStore.Open(OpenFlags.ReadOnly);
      X509Certificate2Collection certCollection = certStore.Certificates.Find(
          X509FindType.FindByThumbprint,
          certificateThumbprint,
          false);
  
      if (certCollection.Count &gt; 0)
      {
          return certCollection[0];
      }
  
      throw new Exception("Certificate not found!");
  }
  </code></pre>
  
  <p>I've verified the certificate thumbprint and even tried putting it hard-coded as string.</p>
  
  <p>When I try to print the number of certificates in the store like this:</p>
  
  <pre><code>Console.WriteLine("certStore.Certificates.Count : " + certStore.Certificates.Count);
  </code></pre>
  
  <p>it returns zero certificates.</p>
  
  <p>I also tried changing <code>StoreName</code> and <code>StoreLocation</code> - still same result. And even when not giving any <code>StoreName</code> or <code>StoreLocation</code> it still doesn't find any certificates.</p>