title: Generate certificate for Azure App Registration
body: <p>In the Azure App Registrations portal I need to generate a new certificate to let my domain services access the Graph.
  I generate a certificate with Powershell like this:</p>
  
  <blockquote>
    <p>New-SelfSignedCertificate -CertStoreLocation "Cert:\CurrentUser\My"
    -Subject "CN=sampleAppCert" -KeySpec KeyExchange</p>
  </blockquote>
  
  <p>The result looks good, but if I want to export this certificate with the certlm.msc to a file, it does not appear in the list.</p>
  
  <p>If I add -DnsName 'my-domain.com' to the parameter list a certificate appears.
  But regarding the Microsoft docs, this value should be <a href="https://docs.microsoft.com/de-de/azure/active-directory/develop/howto-authenticate-service-principal-powershell" rel="nofollow noreferrer">left blank</a>.</p>
  
  <p>In general I am pretty confused to understand the different kinds of certificates and what the parameters mean.</p>
  
  <ol>
  <li>If I use the -DnsName attribute - will this generate a SSL/TLS certificate to secure internet domains?</li>
  <li>What does CN stand for instead?</li>
  <li>Why is the certificate not appearing in the certlm store? How can I export my generated certificate to use it in the Azure Portal when not using the DnsName attribute.</li>
  <li>Are there any recommandable resources to get a better understanding of digital certificates? I am very confused about the whole topic and would like to read something. But especially the microsoft docs are confusing me even more. :(</li>
  </ol>